G
G
goblin35642019-06-22 20:38:59
JavaScript
goblin3564, 2019-06-22 20:38:59

[Discord.js] How can one bot send and read messages from another bot?

I need to set up interaction between two different Discord bots, but I can't understand why the methods created for interacting with users do not work with other bots? For example method:

member.send()
as well as the meaning
message.content
Do not work if the author of the message is another bot. If it's possible with the Discord.js methods, then how can I send messages to another bot and also read the content of other bots' messages? If such methods with bots do not work at all, then is interaction between bots possible at all?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
F
fgvnovoross, 2019-12-17
@fgvnovoross

They actually work... You must have blocked messages from bots. Did you install this or something like that? If yes, but you need to read messages and remove it from bots, or do a separate type check

if(message.author.bot){
//код если бот
}else{
//код если не бот
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question