@nextclaw/channel-runtime 0.1.17 → 0.1.19
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/dist/index.js +7 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -450,13 +450,19 @@ var DiscordChannel = class extends BaseChannel {
|
|
|
450
450
|
}
|
|
451
451
|
}
|
|
452
452
|
try {
|
|
453
|
+
await interaction.deferReply({ ephemeral: true });
|
|
453
454
|
const result = await this.commandRegistry.execute(interaction.commandName, args, {
|
|
454
455
|
channel: this.name,
|
|
455
456
|
chatId: channelId,
|
|
456
457
|
senderId,
|
|
457
458
|
sessionKey: `${this.name}:${channelId}`
|
|
458
459
|
});
|
|
459
|
-
|
|
460
|
+
if (result.ephemeral === false) {
|
|
461
|
+
await interaction.editReply({ content: "Command executed." });
|
|
462
|
+
await interaction.followUp({ content: result.content, ephemeral: false });
|
|
463
|
+
return;
|
|
464
|
+
}
|
|
465
|
+
await interaction.editReply({ content: result.content });
|
|
460
466
|
} catch (error) {
|
|
461
467
|
await this.replyInteraction(interaction, "Command failed to execute.", true);
|
|
462
468
|
console.error(`Discord slash command error: ${String(error)}`);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nextclaw/channel-runtime",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.19",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Runtime implementations for NextClaw builtin channel plugins.",
|
|
6
6
|
"type": "module",
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
],
|
|
16
16
|
"dependencies": {
|
|
17
17
|
"@larksuiteoapi/node-sdk": "^1.58.0",
|
|
18
|
-
"@nextclaw/core": "^0.6.
|
|
18
|
+
"@nextclaw/core": "^0.6.33",
|
|
19
19
|
"@slack/socket-mode": "^1.3.3",
|
|
20
20
|
"@slack/web-api": "^7.6.0",
|
|
21
21
|
"dingtalk-stream": "^2.1.4",
|