TypeError: Cannot read properties of null (reading 'id')
at Object.run (C:\Users\gojo\Desktop\Discord-Chatbot-2.7.0\events\chatEvent.js:8:34)
at Client. (C:\Users\gojo\Desktop\Discord-Chatbot-2.7.0\index.js:61:77)
at Client.emit (node:events:539:35)
at MessageCreateAction.handle (C:\Users\gojo\Desktop\Discord-Chatbot-2.7.0\node_modules\discord.js\src\client\actions\MessageCreate.js:31:14)
at Object.module.exports [as MESSAGE_CREATE] (C:\Users\gojo\Desktop\Discord-Chatbot-2.7.0\node_modules\discord.js\src\client\websocket\handlers\MESSAGE_CREATE.js:4:32)
at WebSocketManager.handlePacket (C:\Users\gojo\Desktop\Discord-Chatbot-2.7.0\node_modules\discord.js\src\client\websocket\WebSocketManager.js:384:31)
at WebSocketShard.onPacket (C:\Users\gojo\Desktop\Discord-Chatbot-2.7.0\node_modules\discord.js\src\client\websocket\WebSocketShard.js:444:22)
at WebSocketShard.onMessage (C:\Users\gojo\Desktop\Discord-Chatbot-2.7.0\node_modules\discord.js\src\client\websocket\WebSocketShard.js:301:10)
at WebSocket.onMessage (C:\Users\gojo\Desktop\Discord-Chatbot-2.7.0\node_modules\ws\lib\event-target.js:132:16)
at WebSocket.emit (node:events:527:28)
if(await db.has(
${message.guild.id}_chatchannel
)) { ^TypeError: Cannot read properties of null (reading 'id') at Object.run (C:\Users\gojo\Desktop\Discord-Chatbot-2.7.0\events\chatEvent.js:8:34) at Client. (C:\Users\gojo\Desktop\Discord-Chatbot-2.7.0\index.js:61:77)
at Client.emit (node:events:539:35)
at MessageCreateAction.handle (C:\Users\gojo\Desktop\Discord-Chatbot-2.7.0\node_modules\discord.js\src\client\actions\MessageCreate.js:31:14)
at Object.module.exports [as MESSAGE_CREATE] (C:\Users\gojo\Desktop\Discord-Chatbot-2.7.0\node_modules\discord.js\src\client\websocket\handlers\MESSAGE_CREATE.js:4:32)
at WebSocketManager.handlePacket (C:\Users\gojo\Desktop\Discord-Chatbot-2.7.0\node_modules\discord.js\src\client\websocket\WebSocketManager.js:384:31)
at WebSocketShard.onPacket (C:\Users\gojo\Desktop\Discord-Chatbot-2.7.0\node_modules\discord.js\src\client\websocket\WebSocketShard.js:444:22)
at WebSocketShard.onMessage (C:\Users\gojo\Desktop\Discord-Chatbot-2.7.0\node_modules\discord.js\src\client\websocket\WebSocketShard.js:301:10)
at WebSocket.onMessage (C:\Users\gojo\Desktop\Discord-Chatbot-2.7.0\node_modules\ws\lib\event-target.js:132:16)
at WebSocket.emit (node:events:527:28)