3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-05-25 10:25:01 +00:00

Update backend/src/plugins/Automod/actions/changePerms.ts

Co-authored-by: Almeida <almeidx@pm.me>
This commit is contained in:
metal 2021-12-10 17:10:40 +00:00 committed by GitHub
parent ce03b75331
commit 432e237a7b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -50,7 +50,7 @@ export const ChangePermsAction = automodAction({
if (!channel) return; if (!channel) return;
const overwrite = channel.permissionOverwrites.cache.find((pw) => pw.id === target); const overwrite = channel.permissionOverwrites.cache.find((pw) => pw.id === target);
const allow = new Permissions(overwrite?.allow ?? 0n).serialize(); const allow = new Permissions(overwrite?.allow ?? 0n).serialize();
const deny = new Permissions(overwrite ? overwrite.deny : "0").serialize(); const deny = new Permissions(overwrite?.deny ?? 0n).serialize();
const newPerms: Partial<Record<PermissionString, boolean | null>> = {}; const newPerms: Partial<Record<PermissionString, boolean | null>> = {};
for (const key in allow) { for (const key in allow) {