【发布时间】:2021-05-27 10:30:54
【问题描述】:
这是我的代码:https://sourceb.in/PZuJymG20t,它给了我这个错误:
(node:25) UnhandledPromiseRejectionWarning: ReferenceError: Cannot access 'command' before initialization
at module.exports (/home/container/events/message.js:32:23)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
(node:25) 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(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:25) [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.
这是一个冷却事件。
【问题讨论】:
-
请将您的代码直接发布到问题中,无需添加将来可能会失效的额外网址。
-
请阅读How to Ask。