From 42ad6c070d90edf1025be28fd1aa7c644149ac60 Mon Sep 17 00:00:00 2001 From: Stefan Le-Minh Date: Fri, 27 Oct 2023 12:44:54 +0200 Subject: [PATCH] Defer reply for endsession --- src/commands/endsession.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/commands/endsession.ts b/src/commands/endsession.ts index 80d8abb..acb4147 100644 --- a/src/commands/endsession.ts +++ b/src/commands/endsession.ts @@ -18,6 +18,7 @@ export const command: Command = { requiresActiveSession: true, async execute (interaction: CommandInteraction, properties: Properties) { if (interaction.guild == null) return + await interaction.deferReply() const promises: Array> = [] const spectatorRoleId = await properties.spectatorRoleIds.get( interaction.guild.id @@ -41,6 +42,6 @@ export const command: Command = { await Promise.allSettled(promises) logger.debug('Session ended! Cleared all data.') - await interaction.reply('I ended the session and cleared all data.') + await interaction.editReply('I ended the session and cleared all data.') } }