1st Review changes

This commit is contained in:
ITOH
2020-12-09 22:55:23 +01:00
parent 56aaef3d2f
commit 20c289308d
+3 -5
View File
@@ -434,9 +434,7 @@ export async function editChannelOverwrite(
throw new Error(Errors.MISSING_MANAGE_CHANNELS); throw new Error(Errors.MISSING_MANAGE_CHANNELS);
} }
const { allow, deny, ...info } = overwrite;
let channel = cache.channels.get(channelID); let channel = cache.channels.get(channelID);
if (!channel) throw new Error(Errors.CHANNEL_NOT_FOUND); if (!channel) throw new Error(Errors.CHANNEL_NOT_FOUND);
const payload = { const payload = {
@@ -448,9 +446,9 @@ export async function editChannelOverwrite(
deny: rawOverwrite.deny, deny: rawOverwrite.deny,
})), })),
{ {
...info, ...overwrite,
allow: calculateBits(allow), allow: calculateBits(overwrite.allow),
deny: calculateBits(deny), deny: calculateBits(overwrite.deny),
}, },
], ],
}; };