(节点:10124)DeprecationWarning:Collection#find:传递函数

时间:2018-11-21 22:48:35

标签: discord.js

当我执行!x命令时说

(node:10124) DeprecationWarning: Collection#find: pass a function instead

(node:10124) DeprecationWarning: Collection#find: pass a function instead

问题在控制台日志中显示为...let channe.. ..downchan...

exports.startScrim = function(guild,host,type,time){ const embed = new RichEmbed() .setColor(0x91bbff) .addField("message x","another message"+exports.one(time),false) .addField("Mode",type.toUpperCase(),true) .addField("Host",host,true) .addField("Instructions","message x",false)

let channel = guild.channels.find("name",guilds[guild.id].digitchan);
let channel2 = guild.channels.find("name",guilds[guild.id].countdownchan);
if (channel && channel2) {
    channel.send(embed)`

,下一行channel.send(embed)甚至没有执行。帮助!

1 个答案:

答案 0 :(得分:0)

这看起来像是以下内容的副本: Collection#find: pass a function instead

您需要做的声音:

dot