From 816e09ea327dca58726bb57c97b5543a0009a256 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Tue, 8 Jun 2021 18:39:13 +0100 Subject: [PATCH] fix: use followUp for deferred interactions --- examples/music-bot/src/bot.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/music-bot/src/bot.ts b/examples/music-bot/src/bot.ts index af809e39..594b1934 100644 --- a/examples/music-bot/src/bot.ts +++ b/examples/music-bot/src/bot.ts @@ -96,7 +96,7 @@ client.on('interaction', async (interaction: Interaction) => { // If there is no subscription, tell the user they need to join a channel. if (!subscription) { - await interaction.reply('Join a voice channel and then try that again!'); + await interaction.followUp('Join a voice channel and then try that again!'); return; } @@ -105,7 +105,7 @@ client.on('interaction', async (interaction: Interaction) => { await entersState(subscription.voiceConnection, VoiceConnectionStatus.Ready, 20e3); } catch (error) { console.warn(error); - await interaction.reply('Failed to join voice channel within 20 seconds, please try again later!'); + await interaction.followUp('Failed to join voice channel within 20 seconds, please try again later!'); return; } @@ -125,7 +125,7 @@ client.on('interaction', async (interaction: Interaction) => { }); // Enqueue the track and reply a success message to the user subscription.enqueue(track); - await interaction.reply(`Enqueued **${track.title}**`); + await interaction.followUp(`Enqueued **${track.title}**`); } catch (error) { console.warn(error); await interaction.reply('Failed to play track, please try again later!');