【发布时间】:2019-02-01 11:28:29
【问题描述】:
我正在编写一个 Discord 机器人,它使用以下代码来检测和处理用户消息:
bot.on('message', function (user, userID, channelID, message, evt) {
//Message handling and response code goes here
});
我想添加一个命令,该命令仅在发送它的用户具有管理员权限时才有效。有没有办法做到这一点?
【问题讨论】:
-
您确定这是
Discord.JS问题吗? DiscordJS 事件看起来并不像那样,该标签应该只用于 DiscordJS 的问题 -
@André OP 似乎在使用
discord.io(这就是我的不和谐机器人事件处理程序看起来像的原因)
标签: javascript node.js bots discord discord.io