Skip to content

Commit

Permalink
fix: search command causes crash
Browse files Browse the repository at this point in the history
this is an oversight as the search command was being expected to reply within 3 seconds, but that was clearly not the case. treating it like how the play command works makes more sense, so deferring the update then editing the reply should fix it.
  • Loading branch information
Max committed Dec 6, 2021
1 parent dfd609a commit 4dd593a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion main.js
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,7 @@ bot.on('interactionCreate', async interaction => {
});
return;
}
await interaction.deferUpdate();
if (!player?.connected) {
player = interaction.client.music.createPlayer(interaction.guildId);
player.queue.channel = interaction.channel;
Expand All @@ -357,7 +358,7 @@ bot.on('interactionCreate', async interaction => {
}
player.queue.add(resolvedTracks, { requester: interaction.user.id });
const started = player.playing || player.paused;
await interaction.update({
await interaction.editReply({
embeds: [
new MessageEmbed()
.setDescription(msg)
Expand Down

0 comments on commit 4dd593a

Please sign in to comment.