create-message-kit 1.0.3 → 1.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3,7 +3,6 @@ import { handler as tipping } from "./handler/tipping.js";
|
|
3
3
|
import { handler as agent } from "./handler/agent.js";
|
4
4
|
import { handler as transaction } from "./handler/transaction.js";
|
5
5
|
import { handler as games } from "./handler/game.js";
|
6
|
-
import { handler as admin } from "./handler/moderation.js";
|
7
6
|
import { handler as loyalty } from "./handler/loyalty.js";
|
8
7
|
|
9
8
|
export const commands: CommandGroup[] = [
|
@@ -140,35 +139,6 @@ export const commands: CommandGroup[] = [
|
|
140
139
|
},
|
141
140
|
],
|
142
141
|
},
|
143
|
-
{
|
144
|
-
name: "Admin",
|
145
|
-
triggers: ["/add", "@add", "/remove", "@remove"],
|
146
|
-
description: "Manage group members and metadata.",
|
147
|
-
commands: [
|
148
|
-
{
|
149
|
-
command: "/add [username]",
|
150
|
-
handler: admin,
|
151
|
-
description: "Add a user.",
|
152
|
-
params: {
|
153
|
-
username: {
|
154
|
-
default: "",
|
155
|
-
type: "username",
|
156
|
-
},
|
157
|
-
},
|
158
|
-
},
|
159
|
-
{
|
160
|
-
command: "/remove [username]",
|
161
|
-
handler: admin,
|
162
|
-
description: "Remove a user.",
|
163
|
-
params: {
|
164
|
-
username: {
|
165
|
-
default: "",
|
166
|
-
type: "username",
|
167
|
-
},
|
168
|
-
},
|
169
|
-
},
|
170
|
-
],
|
171
|
-
},
|
172
142
|
{
|
173
143
|
name: "Split Payments",
|
174
144
|
image: true,
|
@@ -44,10 +44,7 @@ function generateSystemPrompt(context: HandlerContext) {
|
|
44
44
|
${JSON.stringify(commands)}\n
|
45
45
|
The message was sent by @${sender?.username}
|
46
46
|
|
47
|
-
###
|
48
|
-
prompt: /agent lets add @user
|
49
|
-
reply: /add @user
|
50
|
-
|
47
|
+
### Examples
|
51
48
|
prompt /agent tip alix and bo
|
52
49
|
reply /tip @alix @bo 10
|
53
50
|
|
@@ -2,7 +2,6 @@ import { run, HandlerContext } from "@xmtp/message-kit";
|
|
2
2
|
import { handler as tipping } from "./handler/tipping.js";
|
3
3
|
import { handler as agent } from "./handler/agent.js";
|
4
4
|
import { handler as splitpayment } from "./handler/splitpayment.js";
|
5
|
-
import { handler as admin } from "./handler/moderation.js";
|
6
5
|
|
7
6
|
// Main function to run the app
|
8
7
|
run(async (context: HandlerContext) => {
|
@@ -17,9 +16,6 @@ run(async (context: HandlerContext) => {
|
|
17
16
|
case "reply":
|
18
17
|
handleReply(context);
|
19
18
|
break;
|
20
|
-
case "group_updated":
|
21
|
-
admin(context);
|
22
|
-
break;
|
23
19
|
case "remoteStaticAttachment":
|
24
20
|
handleAttachment(context);
|
25
21
|
break;
|