Skip to content

Commit

Permalink
Defer reply for endsession
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanleminh committed Oct 27, 2023
1 parent 2f037a5 commit 42ad6c0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/commands/endsession.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<Promise<void>> = []
const spectatorRoleId = await properties.spectatorRoleIds.get(
interaction.guild.id
Expand All @@ -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.')
}
}

0 comments on commit 42ad6c0

Please sign in to comment.