Quantcast
Channel: Discord.js bot looping using || or operator - Stack Overflow
Browsing latest articles
Browse All 2 View Live

Answer by Dominik for Discord.js bot looping using || or operator

The statement if (message.content === '!help' || '!command') { has two blocks: message.content === '!help' and '!command'. The || or operator says: "either of those things should be true".So it ignores...

View Article


Discord.js bot looping using || or operator

I am having an issue when I use the or opperator || the bot will send 5 messages at once, and continue to loop. Without using the or operator it works fine. It will also accept some letters like c, or...

View Article
Browsing latest articles
Browse All 2 View Live