Skip to content

Commit

Permalink
fix leave message is never edited
Browse files Browse the repository at this point in the history
  • Loading branch information
phenylshima committed Nov 20, 2023
1 parent 7ae8152 commit dfe27c3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/commands/leave.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ export async function handler(
if (!pipeline) {
throw new ReplyableError("ボイスチャンネルに参加していません。");
}
pipeline.connection.destroy();
// State change to `destoryed` is done synchronously.
setImmediate(() => pipeline.connection.destroy());
await Promise.all([interaction.deferReply(), once(pipeline, "destroy")]);
await interaction.editReply("退出しました。");
}

0 comments on commit dfe27c3

Please sign in to comment.