From 2d4441ebbcc8fa74906bbcb70adadf6849f62dcc Mon Sep 17 00:00:00 2001 From: Declan Chidlow Date: Tue, 27 Aug 2024 17:39:22 +0800 Subject: [PATCH] Fix error detecting author of system messages --- bot/src/bot/modules/command_handler.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bot/src/bot/modules/command_handler.ts b/bot/src/bot/modules/command_handler.ts index 3533260..352ca3e 100644 --- a/bot/src/bot/modules/command_handler.ts +++ b/bot/src/bot/modules/command_handler.ts @@ -37,6 +37,8 @@ let commands: SimpleCommand[]; client.on('messageCreate', async msg => { logger.debug(`Message -> ${msg.content}`); + if (msg.systemMessage !== undefined) return; + if (typeof msg.content != 'string' || msg.authorId == client.user?.id || !msg.channel?.server) return;