【发布时间】:2019-08-07 06:32:41
【问题描述】:
如何检测我的机器人是否被提及?
到目前为止,我尝试了这些:
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``");
}
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``");
}
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``");
}
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``");
}
【问题讨论】:
-
添加一些相关代码,而不是分享图片。
-
@Md.SukelAli 我做到了。你能帮帮我吗?
标签: javascript node.js discord.js