检查代理的Discord Bot给出了一个有趣的错误



它不断返回这些错误。我已经检查过它是否是我的代理API,但不是。我认为这是一个内部错误。我已经仔细检查了,NPM安装了所有的依赖项。仍然返回此错误。再次感谢所有的帮助。感谢您抽出时间:3

(node:28544) UnhandledPromiseRejectionWarning: Error [INVALID_TYPE]: Supplied options is not an object.
at Message.delete (c::user/example/Message.js:500:44)        
at c:user/example/server.js:27:21
at processTicksAndRejections (internal/process/task_queues.js:93:5)
(node:28544) 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:28544) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
(node:28544) UnhandledPromiseRejectionWarning: Error [INVALID_TYPE]: Supplied options is not an object.
at Message.delete (c::user/example/Message.js:500:44)
at c:UsersawesoDownloadspolarcop_discord-masterserver.js:32:23
at processTicksAndRejections (internal/process/task_queues.js:93:5)
(node:28544) 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: 2)

根据您提供的堆栈跟踪,您正在向message.delete()方法传递无效参数。在v12上,它接受一个具有timeout和/或reason键的对象,如文档中所示。例如,您必须执行delete({ timeout: 1000 })而不是delete(1000)

然而,请注意,并不是每个人都能在不提供更多信息的情况下回答这个问题,比如给出错误的代码。

相关内容

最新更新