A friend was writing a discord bot using nodejs and ran into an issue where his condition:
client.on("messageCreate", msg => {
if (msg.content == "Ash" || "ash") {
msg.reply("sample text");
Would always return as true, and the bot would reply to every message sent regardless of its content.
We managed to get around it by removing the ||, but I wasn't able to explain why it didn't work. I would appreciate it if anyone could help me.