🐛 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> { async handler(interaction: CommandInteraction): Promise<void> {
await interaction.reply({ await interaction.deferReply();
embeds: [
this.discordMessageService.buildMessage({
title: 'Joining your voice channel...',
}),
],
});
const guildMember = interaction.member as GuildMember; const guildMember = interaction.member as GuildMember;
@ -36,7 +30,7 @@ export class SummonCommand implements DiscordCommand {
); );
if (!tryResult.success) { if (!tryResult.success) {
interaction.editReply(tryResult.reply); await interaction.editReply(tryResult.reply);
return; return;
} }