diff --git a/src/commands/fun/meme.js b/src/commands/fun/meme.js index 0c82a9fd1..c1cc07ab6 100644 --- a/src/commands/fun/meme.js +++ b/src/commands/fun/meme.js @@ -56,13 +56,13 @@ module.exports = class MemeCommand extends Command { collector.on("collect", async (response) => { if (response.customId !== "regenMemeBtn") return; + await response.deferUpdate(); + const embed = await getRandomEmbed(choice); await sentMsg.edit({ embeds: [embed], components: [buttonRow], }); - - await response.deferUpdate(); }); collector.on("end", () => { @@ -98,13 +98,13 @@ module.exports = class MemeCommand extends Command { collector.on("collect", async (response) => { if (response.customId !== "regenMemeBtn") return; + await response.deferUpdate(); + const embed = await getRandomEmbed(choice); await interaction.editReply({ embeds: [embed], components: [buttonRow], }); - - await response.deferUpdate(); }); collector.on("end", () => { diff --git a/src/commands/music/search.js b/src/commands/music/search.js index 563961753..441596d89 100644 --- a/src/commands/music/search.js +++ b/src/commands/music/search.js @@ -159,6 +159,7 @@ async function search({ member, guild, channel }, user, query) { }); collector.on("collect", async (response) => { + if (response.customId !== "search-results") return; const toAdd = []; response.values.forEach((v) => toAdd.push(results[v])); diff --git a/src/commands/utility/help.js b/src/commands/utility/help.js index b92aa455c..f8eda7318 100644 --- a/src/commands/utility/help.js +++ b/src/commands/utility/help.js @@ -162,6 +162,7 @@ const waiter = (msg, userId, prefix) => { let buttonsRow = msg.components[1]; collector.on("collect", async (response) => { + if (!["help-menu", "previousBtn", "nextBtn"].includes(response.customId)) return; await response.deferUpdate(); switch (response.customId) {