mirror of
https://github.com/informaticker/discord-jellyfin-bot.git
synced 2024-11-25 02:51: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> {
|
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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user