Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/383.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 TypeError:对#<;调用了Function.prototype.apply;对象>;,哪一个是对象而不是函数_Javascript_Discord.js_Quick.db - Fatal编程技术网

Javascript TypeError:对#<;调用了Function.prototype.apply;对象>;,哪一个是对象而不是函数

Javascript TypeError:对#<;调用了Function.prototype.apply;对象>;,哪一个是对象而不是函数,javascript,discord.js,quick.db,Javascript,Discord.js,Quick.db,我正在为我的机器人做一个盗窃命令,但是我尝试了一下,我得到了这个错误 (节点:2253)未经处理的PromisejectionWarning:TypeError:Function.prototype.apply已在#上调用,它是一个对象而不是函数 我的代码是这样的,我不知道它从哪里来我想为我的儿子像dank memer一样发出抢劫命令 const Discord=require('Discord.js'); const db=require('quick.db') module.exports.

我正在为我的机器人做一个盗窃命令,但是我尝试了一下,我得到了这个错误
(节点:2253)未经处理的PromisejectionWarning:TypeError:Function.prototype.apply已在#上调用,它是一个对象而不是函数

我的代码是这样的,我不知道它从哪里来我想为我的儿子像dank memer一样发出抢劫命令

const Discord=require('Discord.js');
const db=require('quick.db')
module.exports.run=async(bot、消息、args)=>{
让member=message.notices.members.first()
if(!member)返回message.reply(`youyouyouwant`)
让user=message.author;
let money=wait db.fetch(`mon_${user.id}`)
if(money<2000)返回消息。回复(`你需要至少2000个硬币来尝试抢劫某人!`)
让money2=wait db.fetch(`b_${member.id}`)
if(money2<3000)返回消息。回复(`这家伙的银行里至少没有3000枚硬币,不值得!`)
message.channel.send(`${user.username}正在对${member}\n键入`GG JOIN\`加入他们!`)进行抢劫。然后(()=>{
message.channel.awaitMessages({max:7,时间:70000,错误:['time']})
。然后(消息=>{
message=message.first()
if(message.content.toUpperCase()='GG JOIN'| | message.content.toUpperCase()=='JOIN HEIST'){
message.react(“的第一个参数应该是筛选函数,而不是对象。此筛选函数作为参数访问传入消息,并决定是否让其通过。此函数的常见用法是确保消息作者是原始命令的作者:

message.channel.waitingmessages(
(m) =>m.author.id===message.author.id,
{/*选项*/}
)
如果您不需要任何过滤器,可以使用
()=>true