From 3d220712c41a2f082f147809efdb4b4f7c8261ed Mon Sep 17 00:00:00 2001 From: Manuel <30572287+manuel-rw@users.noreply.github.com> Date: Tue, 24 Jan 2023 21:44:07 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Use=20async=20and=20use=20defer?= =?UTF-8?q?=20instead=20of=20manual=20message?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/commands/summon.command.ts | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/commands/summon.command.ts b/src/commands/summon.command.ts index 08140d2..3a5f2aa 100644 --- a/src/commands/summon.command.ts +++ b/src/commands/summon.command.ts @@ -20,13 +20,7 @@ export class SummonCommand implements DiscordCommand { ) {} async handler(interaction: CommandInteraction): Promise { - await interaction.reply({ - embeds: [ - this.discordMessageService.buildMessage({ - title: 'Joining your voice channel...', - }), - ], - }); + await interaction.deferReply(); const guildMember = interaction.member as GuildMember; @@ -36,7 +30,7 @@ export class SummonCommand implements DiscordCommand { ); if (!tryResult.success) { - interaction.editReply(tryResult.reply); + await interaction.editReply(tryResult.reply); return; }