Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/473.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 当我运行它时,它不会接受我的输入。I';我正试图用node.js和discord.js创建一个discord机器人_Javascript_Bots_Discord_New Operator - Fatal编程技术网

Javascript 当我运行它时,它不会接受我的输入。I';我正试图用node.js和discord.js创建一个discord机器人

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.", {

今天刚开始编写代码,并查看一些示例。尝试创建一个任务给予者机器人,但在我尝试添加更多选择后,输入不起作用

client.on('message',message=>{ console.log(message.content)

})); }})

没有错误消息,它运行只是对我的不和谐不起作用

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!');
    });