How can I detect if my bot is mentioned?
I tried these thus far:
if (msg.content.toLowerCase().includes('@The Guardian of The Bar#5180')) {
msg.channel.send("My prefix here is" + prefix + "
You can start with ``" + prefix + "help``");
}
if (msg.content.toLowerCase().includes('@The Guardian of The Bar')) {
msg.channel.send("My prefix here is" + prefix + "
You can start with ``" + prefix + "help``");
}
if (msg.content.includes('@The Guardian of The Bar#5180')) {
msg.channel.send("My prefix here is" + prefix + "
You can start with ``" + prefix + "help``");
}
if (msg.content.includes('@The Guardian of The Bar#5180')) {
msg.channel.send("My prefix here is" + prefix + "
You can start with ``" + prefix + "help``");
}
See Question&Answers more detail:os