【发布时间】:2020-11-23 16:34:15
【问题描述】:
示例:
user: "Hello!" - bot: "Hi! You wanna help with the codes?"
user: "No" - bot: "Okay!"
但它只有在用户打招呼时才会发生。我不想让他回应“好吧!”当用户在任何句子中说“不”时......
然后我使用机器人回复用户的代码是:
client.on('message', async message => {
if (message.content.toLowerCase().includes("hello")) {
message.channel.send("Hi! You wanna help with the codes?");
}
});
对不起我的英语错误,我不会说那么多英语......
无论如何,有人可以帮助我吗?
【问题讨论】:
标签: javascript node.js discord bots discord.js