From 3c3327d9f0441e537d809829c9ff10d6ab19431f Mon Sep 17 00:00:00 2001 From: Dragory <2606411+Dragory@users.noreply.github.com> Date: Wed, 15 Apr 2020 22:38:13 +0300 Subject: [PATCH] Fix automod error when the member is not cached --- backend/src/plugins/Automod/Automod.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/src/plugins/Automod/Automod.ts b/backend/src/plugins/Automod/Automod.ts index 17b69153..eebf0e1a 100644 --- a/backend/src/plugins/Automod/Automod.ts +++ b/backend/src/plugins/Automod/Automod.ts @@ -595,7 +595,7 @@ export class AutomodPlugin extends ZeppelinPlugin T | Promise | null, ): Promise>> { const messageInfo: MessageInfo = { channelId: msg.channel_id, messageId: msg.id, userId: msg.user_id }; - const member = this.guild.members.get(msg.user_id); + const member = await this.getMember(msg.user_id); if (trigger.match_messages && msg.data.content) { const str = msg.data.content; @@ -638,7 +638,7 @@ export class AutomodPlugin extends ZeppelinPlugin