我在 heroku 上托管了我的机器人,所以我试图获取一个在我的 mongodb 数据库中的 profileData 但我遇到了一个问题,每当我运行代码时,它都会说:-
UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'send' of undefined
2021-07-27T06:08:45.730138+00:00 app[Worker.1]: at Object.execute (/app/commands/command.js:21:25)
2021-07-27T06:08:45.730139+00:00 app[Worker.1]: at module.exports (/app/events/guild/message.js:53:27)
2021-07-27T06:08:45.730140+00:00 app[Worker.1]: at processTicksAndRejections (internal/process/task_queues.js:95:5)
2021-07-27T06:08:45.730157+00:00 app[Worker.1]: (node:4) 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)
2021-07-27T06:08:45.730224+00:00 app[Worker.1]: (node:4) [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.