HopsonCommunity / HopsonBot

Discord bot for the Hopson Community Server, written using Discord.js
MIT License
14 stars 8 forks source link

TypeError: Cannot read property 'displayName' of null #37

Open iCiaran opened 6 years ago

iCiaran commented 6 years ago
TypeError: Cannot read property 'displayName' of null
    at logMessageInfo (/home/hopbot/HopsonBot/src/events/message_sent_handler.js:103:33)
    at MessageSentHandler.handleMessageSent (/home/hopbot/HopsonBot/src/events/message_sent_handler.js:26:9)
    at Client.client.on (/home/hopbot/HopsonBot/src/hopson_bot.js:31:37)
    at Client.emit (events.js:159:13)
    at MessageCreateHandler.handle (/home/hopbot/HopsonBot/node_modules/discord.js/src/client/websocket/packets/handlers/MessageCreate.js:9:34)
    at WebSocketPacketManager.handle (/home/hopbot/HopsonBot/node_modules/discord.js/src/client/websocket/packets/WebSocketPacketManager.js:103:65)
    at WebSocketConnection.onPacket (/home/hopbot/HopsonBot/node_modules/discord.js/src/client/websocket/WebSocketConnection.js:333:35)
    at WebSocketConnection.onMessage (/home/hopbot/HopsonBot/node_modules/discord.js/src/client/websocket/WebSocketConnection.js:296:17)
    at WebSocket.onMessage (/home/hopbot/HopsonBot/node_modules/ws/lib/event-target.js:120:16)
    at WebSocket.emit (events.js:159:13)

Can just check if it's null first but would rather know what caused it.

Hopson97 commented 6 years ago

:thinking:

Hopson97 commented 5 years ago

Is this still an issue?