🐛 Use async and use defer instead of manual message

This commit is contained in:
Manuel 2023-01-24 21:44:07 +01:00
parent 320fb2d153
commit 3d220712c4

View File

@ -20,13 +20,7 @@ export class SummonCommand implements DiscordCommand {
) {}
async handler(interaction: CommandInteraction): Promise<void> {
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;
}