【发布时间】:2022-01-23 14:38:28
【问题描述】:
您好,我正在运行第 12 版中的 discord.js 机器人,我想要它,所以如果它遇到错误,它会停止该命令的其余部分运行,而不会停止它自己的整个机器人 这是我当前的代码:
async function startApp () {
const currentUser = await noblox.setCookie(args.join(" "))
.catch( (err) => {
message.channel.send("Invaild or Expired data")
})
// rest of the program
【问题讨论】:
-
setCookie()是否返回承诺?什么错误会使您的机器人崩溃?
标签: javascript error-handling discord discord.js