【发布时间】:2021-03-26 05:22:16
【问题描述】:
为什么这段代码每次都运行 catch? 禁令有效,消息被发送,它完美地记录到审计日志,但消息总是被捕获,有人可以帮我解释为什么会发生这种情况
getBan.ban({reason: banReason})
.then(() => {
message.channel.send(banEmbed)
getBan.send(banDM)
})
.catch(message.reply('Something went wrong. Is the user ID valid?'))
它仍然发送错误消息,说 getBan 不是函数(因为用户 id/tag 无效或不在服务器中)
【问题讨论】:
标签: javascript node.js discord.js