Fix missing error code handling when posting case logs

This commit is contained in:
Dragory 2020-06-14 23:58:11 +03:00
parent 7ceb503d07
commit 00aeab6cdd
No known key found for this signature in database
GPG key ID: 5F387BA66DF8AAC1

View file

@ -283,7 +283,7 @@ export class CasesPlugin extends ZeppelinPlugin<TConfigSchema> {
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})`,
);