Imaginary-Horizons-Productions / DirectoryBot

ARCHIVED PROJECT - A configurable, multi-language Discord bot for securely tracking usernames and converting time zones.
https://www.patreon.com/imaginaryhorizonsproductions
MIT License
1 stars 1 forks source link

Crash: convert command from DM? #231

Open ntseng opened 3 years ago

ntseng commented 3 years ago
/home/nathanieltseng/DirectoryBot/Commands/convert.js:60
                if (directories[receivedMessage.guild.id].userDictionary[receivedMessage.auth
or.id].timezone.value) {
                                                      ^
TypeError: Cannot read property 'id' of null
    at Command.command.execute (/home/nathanieltseng/DirectoryBot/Commands/convert.js:60:41)
    at Client.<anonymous> (/home/nathanieltseng/DirectoryBot/bot.js:255:33)
    at Client.emit (node:events:394:28)
    at MessageCreateAction.handle (/home/nathanieltseng/DirectoryBot/node_modules/discord.js/
src/client/actions/MessageCreate.js:31:14)
    at Object.module.exports [as MESSAGE_CREATE] (/home/nathanieltseng/DirectoryBot/node_modu
les/discord.js/src/client/websocket/handlers/MESSAGE_CREATE.js:4:32)
    at WebSocketManager.handlePacket (/home/nathanieltseng/DirectoryBot/node_modules/discord.
js/src/client/websocket/WebSocketManager.js:384:31)
    at WebSocketShard.onPacket (/home/nathanieltseng/DirectoryBot/node_modules/discord.js/src
/client/websocket/WebSocketShard.js:444:22)
    at WebSocketShard.onMessage (/home/nathanieltseng/DirectoryBot/node_modules/discord.js/sr
c/client/websocket/WebSocketShard.js:301:10)
    at WebSocket.onMessage (/home/nathanieltseng/DirectoryBot/node_modules/ws/lib/event-targe
t.js:132:16)
    at WebSocket.emit (node:events:394:28)