Javascript 当我运行它时,它不会接受我的输入。I';我正试图用node.js和discord.js创建一个discord机器人
今天刚开始编写代码,并查看一些示例。尝试创建一个任务给予者机器人,但在我尝试添加更多选择后,输入不起作用 client.on('message',message=>{ console.log(message.content) })); }}) 没有错误消息,它运行只是对我的不和谐不起作用Javascript 当我运行它时,它不会接受我的输入。I';我正试图用node.js和discord.js创建一个discord机器人,javascript,bots,discord,new-operator,Javascript,Bots,Discord,New Operator,今天刚开始编写代码,并查看一些示例。尝试创建一个任务给予者机器人,但在我尝试添加更多选择后,输入不起作用 client.on('message',message=>{ console.log(message.content) })); }}) 没有错误消息,它运行只是对我的不和谐不起作用 if(message.content.startsWith(`${prefix}explore val`)) { //message.channel.send("Testing message.", {
if(message.content.startsWith(`${prefix}explore val`)) {
//message.channel.send("Testing message.", { files: ["./quest/stone-men-2.gif"] });
message.channel.send("test.");
message.channel.send("test ");
message.channel.send('What will be your course of action? This will await will be cancelled in 30 seconds. It will finish when you provide a message that goes through the filter the first time.')
.then(() => {
message.channel.awaitMessages(response => response.content === 'A', 'B', 'C', {
max: 3,
time: 30000,
errors: ['time'],
})
.then((collected) => {
message.channel.send(`The collected message was: ${collected.first().content}`);
})
.catch(() => {
message.channel.send('There was no collected message that passed the filter within the time limit!');
});