@Muhendalf1

Как решить ошибку модулей node js?

Шалом, такая вот проблема, решил сделать бота для дискорда используя node.js и discord .js и столкнулся с такой проблемой при запуске.

Код ошибки
(node:3336) UnhandledPromiseRejectionWarning: ReferenceError: slice is not defined
    at Client.<anonymous> (C:\Users\Muhendalf\Desktop\MoaningSlavesRadio\index.js:26:37)
    at Client.emit (events.js:315:20)
    at MessageCreateAction.handle (C:\Users\Muhendalf\Desktop\MoaningSlavesRadio\node_modules\discord.js\src\client\actions\MessageCreate.js:31:14)
    at Object.module.exports [as MESSAGE_CREATE] (C:\Users\Muhendalf\Desktop\MoaningSlavesRadio\node_modules\discord.js\src\client\websocket\handlers\MESSAGE_CREATE.js:4:32)
    at WebSocketManager.handlePacket (C:\Users\Muhendalf\Desktop\MoaningSlavesRadio\node_modules\discord.js\src\client\websocket\WebSocketManager.js:384:31)
    at WebSocketShard.onPacket (C:\Users\Muhendalf\Desktop\MoaningSlavesRadio\node_modules\discord.js\src\client\websocket\WebSocketShard.js:444:22)
    at WebSocketShard.onMessage (C:\Users\Muhendalf\Desktop\MoaningSlavesRadio\node_modules\discord.js\src\client\websocket\WebSocketShard.js:301:10)
    at WebSocket.onMessage (C:\Users\Muhendalf\Desktop\MoaningSlavesRadio\node_modules\ws\lib\event-target.js:125:16)
    at WebSocket.emit (events.js:315:20)
    at Receiver.receiverOnMessage (C:\Users\Muhendalf\Desktop\MoaningSlavesRadio\node_modules\ws\lib\websocket.js:797:20)
(node:3336) 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: 2)


Подключал модуль FS для работы некоторых команд и столкнулся с данной проблемы, знает кто как решить?
  • Вопрос задан
  • 119 просмотров
Пригласить эксперта
Ваш ответ на вопрос

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

Войти через центр авторизации
Похожие вопросы