Skip to content

Commit

Permalink
fixes #106
Browse files Browse the repository at this point in the history
  • Loading branch information
saiteja-madha committed Feb 22, 2022
1 parent eddc6f7 commit aef6ebf
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/commands/fun/meme.js
Original file line number Diff line number Diff line change
Expand Up @@ -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", () => {
Expand Down Expand Up @@ -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", () => {
Expand Down
1 change: 1 addition & 0 deletions src/commands/music/search.js
Original file line number Diff line number Diff line change
Expand Up @@ -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]));

Expand Down
1 change: 1 addition & 0 deletions src/commands/utility/help.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit aef6ebf

Please sign in to comment.