Skip to content

Commit

Permalink
Fix msg.deleted deprecation error
Browse files Browse the repository at this point in the history
  • Loading branch information
zfbx authored Mar 24, 2022
1 parent 952d68e commit 2cd2fcd
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions server/bot.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,10 +120,8 @@ class Bot extends Client {
collector.resetTimer();
});
collector.on("end", () => {
if (!curPage.deleted) {
const disabledRow = new MessageActionRow().addComponents(buttonList[0].setDisabled(true), buttonList[1].setDisabled(true));
curPage.edit({ embeds: [pages[page].setFooter({ text: `Page ${page + 1} / ${pages.length}` })], components: [disabledRow] });
}
const disabledRow = new MessageActionRow().addComponents(buttonList[0].setDisabled(true), buttonList[1].setDisabled(true));
curPage.edit({ embeds: [pages[page].setFooter({ text: `Page ${page + 1} / ${pages.length}` })], components: [disabledRow] }).catch(console.error);
});
return curPage;
}
Expand Down

0 comments on commit 2cd2fcd

Please sign in to comment.