Skip to content

Id undefined  #10

Description

@typicalscimmer

When i run the code and do the setup command is just automatically said
(node:149) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'id' of undefined
at Client. (/home/runner/Mod-Mail-5/index.js:191:50)
at Client.emit (events.js:314:20)
at MessageCreateAction.handle (/home/runner/Mod-Mail-5/node_modules/discord.js/src/client/actions/MessageCreate.js:31:14)
at Object.module.exports [as MESSAGE_CREATE] (/home/runner/Mod-Mail-5/node_modules/discord.js/src/client/websocket/handlers/MESSAGE_CREATE.js:4:32)
at WebSocketManager.handlePacket (/home/runner/Mod-Mail-5/node_modules/discord.js/src/client/websocket/WebSocketManager.js:384:31)
at WebSocketShard.onPacket (/home/runner/Mod-Mail-5/node_modules/discord.js/src/client/websocket/WebSocketShard.js:444:22)
at WebSocketShard.onMessage (/home/runner/Mod-Mail-5/node_modules/discord.js/src/client/websocket/WebSocketShard.js:301:10)
at WebSocket.onMessage (/home/runner/Mod-Mail-5/node_modules/ws/lib/event-target.js:132:16)
at WebSocket.emit (events.js:314:20)
at Receiver.receiverOnMessage (/home/runner/Mod-Mail-5/node_modules/ws/lib/websocket.js:970:20)
(node:149) 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:149) [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.

Not Sure how to fix this

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions