From ce03b75331a6425757b4e7272a77a5f20daf8f56 Mon Sep 17 00:00:00 2001 From: metal Date: Fri, 10 Dec 2021 17:10:32 +0000 Subject: [PATCH] Update backend/src/plugins/Automod/actions/changePerms.ts Co-authored-by: Almeida --- backend/src/plugins/Automod/actions/changePerms.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/src/plugins/Automod/actions/changePerms.ts b/backend/src/plugins/Automod/actions/changePerms.ts index 3b1dc6e7..747a236b 100644 --- a/backend/src/plugins/Automod/actions/changePerms.ts +++ b/backend/src/plugins/Automod/actions/changePerms.ts @@ -49,7 +49,7 @@ export const ChangePermsAction = automodAction({ const channel = await pluginData.guild.channels.fetch(channelId); if (!channel) return; const overwrite = channel.permissionOverwrites.cache.find((pw) => pw.id === target); - const allow = new Permissions(overwrite ? overwrite.allow : "0").serialize(); + const allow = new Permissions(overwrite?.allow ?? 0n).serialize(); const deny = new Permissions(overwrite ? overwrite.deny : "0").serialize(); const newPerms: Partial> = {};