Fix error detecting author of system messages

This commit is contained in:
Declan Chidlow 2024-08-27 17:39:22 +08:00
parent b29a04e5b3
commit 2d4441ebbc

View file

@ -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;