Saamstep / modmail

Support tickets managed in Discord with ease.
https://samstep.net
48 stars 25 forks source link

[BUG] - Issue with DM bot. #44

Closed mrc4tt closed 3 years ago

mrc4tt commented 3 years ago

Describe the bug Writes DM to BOT and this error appears in PuTTY.

To Reproduce Steps to reproduce the behavior:

  1. Start the bot
  2. DM the bot and type: hi
  3. get an error about 'id'

Console/Error logs

(node:910395) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'id' of undefined
    at CommandoClient.<anonymous> (/home/marc/modmail/index.js:449:112)
    at CommandoClient.emit (events.js:387:35)
    at MessageCreateAction.handle (/home/marc/modmail/node_modules/discord.js/src/client/actions/MessageCreate.js:31:14)
    at Object.module.exports [as MESSAGE_CREATE] (/home/marc/modmail/node_modules/discord.js/src/client/websocket/handlers/MESSAGE_CREATE.js:4:32)
    at WebSocketManager.handlePacket (/home/marc/modmail/node_modules/discord.js/src/client/websocket/WebSocketManager.js:384:31)
    at WebSocketShard.onPacket (/home/marc/modmail/node_modules/discord.js/src/client/websocket/WebSocketShard.js:444:22)
    at WebSocketShard.onMessage (/home/marc/modmail/node_modules/discord.js/src/client/websocket/WebSocketShard.js:301:10)
    at WebSocket.onMessage (/home/marc/modmail/node_modules/ws/lib/event-target.js:132:16)
    at WebSocket.emit (events.js:375:28)
    at Receiver.receiverOnMessage (/home/marc/modmail/node_modules/ws/lib/websocket.js:970:20)

System Info

Operating System/Host info: Ubuntu 20.04 NodeJS version: 14.17.3 NPM version: 6.14.13 DiscordJS version: 12.5.3 Bot version: 2.1.2

Saamstep commented 3 years ago

Did you set a mod role in the config?