我在寻找频道时遇到了问题!代码:
let chan = `ticket-${message.author.username}`;
if (message.guild.channels.find(channel => channel.name === chan)) {
message.channel.send("You already have a channel!")
}
错误:
TypeError: message.guild.channels.find is not a function
我希望有人能帮助我! :-)
答案 0 :(得分:0)
从discord.js v12开始,您需要使用(new TotalFullDays(
new FromRange(
new FromISO8601('2011-08-19 17:14:40'),
new Now()
)
))
->value();
访问channels
集合,因此您的解决方案将是:
cache