create-message-kit 1.1.7-beta.2 → 1.1.7-beta.4
Sign up to get free protection for your applications and to get access to all the features.
- package/package.json +1 -1
- package/templates/group/src/index.ts +14 -17
package/package.json
CHANGED
@@ -1,23 +1,20 @@
|
|
1
1
|
import { run, HandlerContext } from "@xmtp/message-kit";
|
2
2
|
|
3
3
|
// Main function to run the app
|
4
|
-
run(
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
},
|
19
|
-
{ attachments: true },
|
20
|
-
);
|
4
|
+
run(async (context: HandlerContext) => {
|
5
|
+
const {
|
6
|
+
message: { typeId },
|
7
|
+
group,
|
8
|
+
} = context;
|
9
|
+
switch (typeId) {
|
10
|
+
case "reply":
|
11
|
+
handleReply(context);
|
12
|
+
break;
|
13
|
+
}
|
14
|
+
if (!group) {
|
15
|
+
context.send("This is a group bot, add this address to a group");
|
16
|
+
}
|
17
|
+
});
|
21
18
|
async function handleReply(context: HandlerContext) {
|
22
19
|
const {
|
23
20
|
v2client,
|