matveyyyyyyyy
@matveyyyyyyyy

Что означает эта ошибка?

Консоль выдает вот такую ошибку:
(node:5548) UnhandledPromiseRejectionWarning: DiscordAPIError: Cannot send messages to this user
at RequestHandler.execute (C:\tutor\node_modules\discord.js\src\rest\RequestHandler.js:154:13)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
at async RequestHandler.push (C:\tutor\node_modules\discord.js\src\rest\RequestHandler.js:39:14)
at async ClientUser.createDM (C:\tutor\node_modules\discord.js\src\structures\User.js:250:18)
(node:5548) 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_reje...). (rejection id: 1)
(node:5548) [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.

В чем трабл? Я бы и скинул код, просто его очень много. Если понадобится какой-то определенный кусочек, то пишите. Бот работает, просто консоль засоряется этим сообщением.
  • Вопрос задан
  • 11825 просмотров
Решения вопроса 1
@askhat

UnhandledPromiseRejectionWarning: DiscordAPIError: Cannot send messages to this user
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().


В вольном переводе на русский будет: у тебя есть асинхронный вызов в коде который завершается исключением и его нужно обработать в try/catch или Promise.catch.
Ответ написан
Комментировать
Пригласить эксперта
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Войти через центр авторизации
Похожие вопросы
10 мая 2024, в 03:40
1500 руб./за проект
10 мая 2024, в 03:02
5000 руб./за проект
10 мая 2024, в 02:29
300 руб./за проект