R
R
Rag'n' Code Man2020-10-30 00:39:27
Node.js
Rag'n' Code Man, 2020-10-30 00:39:27

The bot does not see anyone but me. What is the problem?

I monitor the !moderator command and if someone sent this message, then

message.guild.members.cache.get("id").send("сообщение")


But for some reason I do not understand, he stupidly does not see any users other than me.

for example
message.guild.members.cache.has("id любого участника, кроме меня")
will output false .

It doesn't work either, and I even tried deploying it to hosting.. Nope, it doesn't work...Client.users.cache.get("id")


TypeError: Cannot read property 'send' of undefined


Moreover, if you specify my id in send, then everything will be ok.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Rag'n' Code Man, 2020-10-31
@iDmitriyWinX

Problem solved. Don't forget to give the bots the right permissions :)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question