N
N
Nikita Kudrin2020-09-19 07:03:27
Node.js
Nikita Kudrin, 2020-09-19 07:03:27

How to make a certain role be able to click on the reaction?

How to make a certain role be able to trigger an action when clicked on react?
I tried this in a collector filter:

user.roles.cache.some(role => role.id === "754937728961085450")

And then this:
client.users.cache.get(user.id).roles.cache.some(r => r.id === "754937728961085450")

But nothing happened.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander, 2020-09-19
@HepkaPlay

. . . 
collector.on("collect", r => {
    if (message.member.roles.has("айди роли")) {
        . . .
    } else {
       return;
    }
})

if that doesn't work, try putting it cachein front of.has

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question