Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Limit reactions to certain members only #16

Open
WiseDevHelper opened this issue Jan 13, 2021 · 1 comment
Open

Limit reactions to certain members only #16

WiseDevHelper opened this issue Jan 13, 2021 · 1 comment

Comments

@WiseDevHelper
Copy link

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.

@psibean
Copy link

psibean commented Jan 18, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants