@nextclaw/channel-runtime 0.1.17 → 0.1.18

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.
Files changed (2) hide show
  1. package/dist/index.js +7 -1
  2. package/package.json +1 -1
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
- await this.replyInteraction(interaction, result.content, result.ephemeral ?? true);
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.17",
3
+ "version": "0.1.18",
4
4
  "private": false,
5
5
  "description": "Runtime implementations for NextClaw builtin channel plugins.",
6
6
  "type": "module",