如何检测是否提到了我的机器人?
到目前为止,我尝试了这些:
if (msg.content.toLowerCase().includes('@The Guardian of The Bar#5180')) {
msg.channel.send("My prefix here is" + prefix + "\n You can start with ``" + prefix + "help``");
}
Run Code Online (Sandbox Code Playgroud)
if (msg.content.toLowerCase().includes('@The Guardian of The Bar')) {
msg.channel.send("My prefix here is" + prefix + "\n You can start with ``" + prefix + "help``");
}
Run Code Online (Sandbox Code Playgroud)
if (msg.content.includes('@The Guardian of The Bar#5180')) {
msg.channel.send("My prefix here is" + prefix + "\n You can start with ``" + prefix + "help``");
}
Run Code Online (Sandbox Code Playgroud)
if (msg.content.includes('@The Guardian …Run Code Online (Sandbox Code Playgroud)