【发布时间】:2021-04-26 19:14:43
【问题描述】:
我尝试使用参数和提及来创建命令。我所做的是,我想提一下文本通道作为论据。 我可能解释得不太好
这是示例
例如,我添加了语法为:<prefix> <message> <#channel> 的命令,但我不能在参数 [2] 中提及频道。
我尝试了什么:
let msg = args[1];
let channel = message.mentions.channels.first(args[2]); // It quite not make any sense, right?
message.channel.send(`Message: ${msg} \nIn channel: ${channel}!`);
它只是崩溃了。这里有一点帮助!
【问题讨论】:
标签: discord.js