create-message-kit 1.1.7-beta.2 → 1.1.7-beta.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.
- 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,
|