From 00aeab6cddf2dc1cd1c32abe55a1e273dc7f8dfe Mon Sep 17 00:00:00 2001 From: Dragory <2606411+Dragory@users.noreply.github.com> Date: Sun, 14 Jun 2020 23:58:11 +0300 Subject: [PATCH] Fix missing error code handling when posting case logs --- backend/src/plugins/Cases.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/src/plugins/Cases.ts b/backend/src/plugins/Cases.ts index 530dcc9e..eb5daaaf 100644 --- a/backend/src/plugins/Cases.ts +++ b/backend/src/plugins/Cases.ts @@ -283,7 +283,7 @@ export class CasesPlugin extends ZeppelinPlugin { try { result = await caseLogChannel.createMessage(content, file); } catch (e) { - if (isDiscordRESTError(e) && e.code === 50013) { + if (isDiscordRESTError(e) && (e.code === 50013 || e.code === 50001)) { logger.warn( `Missing permissions to post mod cases in <#${caseLogChannel.id}> in guild ${this.guild.name} (${this.guild.id})`, );