Пишу на языке JS (Java Script) кому интересно можете отредактировать код. (отправлю в дискорд лично : ertoletik2002#5011)
PS C:\Bots\testbot\testbot> node . i
Load 1 commands
1.ping.js Load!
Logined and ready Nexon (English)
(node:9508) DeprecationWarning: Client#generateInvite: Generate invite with an options object instead of a PermissionResolvable
https://discord.com/api/oauth2/authorize?client_id=769521835011735594&permissions=8&scope=bot
(node:9508) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'bot' of undefined
at Client.<anonymous> (C:\Bots\testbot\testbot\bot.js:30:20)
at Client.emit (events.js:314:20)
at MessageCreateAction.handle (C:\Bots\testbot\testbot\node_modules\discord.js\src\client\actions\MessageCreate.js:31:14)
at Object.module.exports [as MESSAGE_CREATE] (C:\Bots\testbot\testbot\node_modules\discord.js\src\client\websocket\handlers\MESSAGE_CREATE.js:4:32)
at WebSocketManager.handlePacket (C:\Bots\testbot\testbot\node_modules\discord.js\src\client\websocket\WebSocketManager.js:384:31)
at WebSocketShard.onPacket (C:\Bots\testbot\testbot\node_modules\discord.js\src\client\websocket\WebSocketShard.js:444:22)
at WebSocketShard.onMessage (C:\Bots\testbot\testbot\node_modules\discord.js\src\client\websocket\WebSocketShard.js:301:10)
at WebSocket.onMessage (C:\Bots\testbot\testbot\node_modules\ws\lib\event-target.js:125:16)
at WebSocket.emit (events.js:314:20)
at Receiver.receiverOnMessage (C:\Bots\testbot\testbot\node_modules\ws\lib\websocket.js:797:20)
(node:9508) 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:9508) [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.
Вы не обработали какой-то промис:
Unhandled Promise Rejection
Смотрите, какой участок кода возвращает промис и обработайте его с помощью then и catch и тогда всё будет работать.
И код киньте вот сюда, в дискорд не полезу