【发布时间】:2022-01-19 03:08:30
【问题描述】:
我在虚拟机和 AWS 上设置了 20.04 Ubuntu 服务器来运行不再由开发人员托管的 uno 机器人。 (https://github.com/Exium1/UnoBot) 我一直在按照某人的指南进行设置 (https://github.com/DaanWet/UnoBot/blob/master/documentation/Install.md),但是当我启动它时它失败了。
我收到以下错误:
(node:14998) UnhandledPromiseRejectionWarning: DiscordHTTPError: 401 Unauthorized on GET /api/v9/gateway/bot
at RequestHandler.request (/home/ubuntu/UnoBot/node_modules/eris-sharder/node_modules/eris/lib/rest/RequestHandler.js:75:15)
at Client.getBotGateway (/home/ubuntu/UnoBot/node_modules/eris-sharder/node_modules/eris/lib/Client.js:2135:36)
at ClusterManager.calculateShards (/home/ubuntu/UnoBot/node_modules/eris-sharder/src/sharding/clustermanager.js:507:38)
at process.nextTick (/home/ubuntu/UnoBot/node_modules/eris-sharder/src/sharding/clustermanager.js:179:41)
at process._tickCallback (internal/process/next_tick.js:61:11)
at Function.Module.runMain (internal/modules/cjs/loader.js:834:11)
at startup (internal/bootstrap/node.js:283:19)
at bootstrapNodeJSCore (internal/bootstrap/node.js:623:3)
(node:14998) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by
rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:14998) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js pro
cess with a non-zero exit code.
谁能帮忙解决这个问题?
【问题讨论】:
-
问题不在于承诺拒绝没有得到处理。真正的问题是您收到来自服务器的 HTTP 401 Unauthorized 响应。您是否对此服务器进行了身份验证,以便您可以重试?
-
这是一个不和谐的机器人,你在 config.js 文件中有一个令牌,所以我应该有身份验证
-
权限问题?用合适的人重新邀请机器人。
-
错误只是指一个无效的token 你需要添加一个有效的token here 并重命名为config.js
标签: mongodb npm discord discord.js