discord.js-pagination
discord.js-pagination copied to clipboard
FIX: If your bot unreacts to the embed
Go to index.js and remove line 13. (reaction.users.remove(msg.author);
)
Removing that line is NOT a fix. If you remove that line of code, if the user who sent a message/command to create the embed reacts it, their reaction won't be removed, therefore they will need to click multiple times to have the collect
event fired for a second reaction.
The only case where that line of code is going to remove the BOTS reaction is if the message you're passing into paginationEmbed
was created by the bot in the first place. This is incorrect / not the intended usage. The message
you PASS into paginationEmbed
should be the message sent by a member that initiated a command where your bot responded with the embed.
Either way, my PR fixes this issue by using the user
parameter of the collect event instead. It also provides additional customizability.