discord.js-pagination icon indicating copy to clipboard operation
discord.js-pagination copied to clipboard

Limit reactions to certain members only

Open WiseDevHelper opened this issue 4 years ago • 1 comments

The package is pretty awesome and easy to use, adding this will make it very productive.

So, if a user is (let's say) playing a game with the reactions... And another user decides to sabotage the game, that wouldn't be good...

So maybe add a LimitUsers option that is an array of the IDs of who can use the reactions.

WiseDevHelper avatar Jan 13 '21 05:01 WiseDevHelper

I'd say this is partially resolved with my PR, you could write your own collector filter which could check the user against your criteria and whether or not the reaction should be collected.

For example you could have the following collector filter:

(reaction, user, emojiList) => emojiList.includes(reaction.emoji.name) && !user.bot && myListOfUserIds.includes(user.id)

In this case, if the user id is not in the provided list the reaction would be ignored by the collect event.

psibean avatar Jan 18 '21 08:01 psibean