Can bot detect other bot message?

Can bot detect other bot message? Like if the bot send hi, my bot will send hello
6 Replies
d.js toolkit
d.js toolkit2y ago
• What's your exact discord.js npm list discord.js and node node -v version? • Post the full error stack trace, not just the top part! • Show your code! • Explain what exactly your issue is. • Not a discord.js issue? Check out #useful-servers.
treble/luna
treble/luna2y ago
if you do not ignore messages from other bots, which i do not recommend because you will probably create a loop of your bot replying to itself
CoolName | Exam
CoolName | ExamOP2y ago
how to make it dont ignore message from other bots?
treble/luna
treble/luna2y ago
by not using that if(user.bot) statement but again that's a really bad idea
d.js docs
d.js docs2y ago
It's good practice to make your bots ignore other bots, including itself. This can be done through a single line of code:
if (<message>.author.bot) return;
if (<message>.author.bot) return;
<message> being whatever you defined message as.
Louis -v-
Louis -v-2y ago
if (<user>.bot && <user>.id !==
<client>.user.id) {

}
if (<user>.bot && <user>.id !==
<client>.user.id) {

}
Want results from more Discord servers?
Add your server