mirror of
https://github.com/informaticker/discord-jellyfin-bot.git
synced 2024-11-24 18:41:57 +01:00
🐛 Use async and use defer instead of manual message
This commit is contained in:
parent
320fb2d153
commit
3d220712c4
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user