Skip to content
This repository has been archived by the owner on Jul 12, 2023. It is now read-only.

Commit

Permalink
fix: use followUp for deferred interactions
Browse files Browse the repository at this point in the history
  • Loading branch information
amishshah committed Jun 8, 2021
1 parent 2e39420 commit 816e09e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions examples/music-bot/src/bot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand All @@ -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;
}

Expand All @@ -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!');
Expand Down

0 comments on commit 816e09e

Please sign in to comment.