mirror of
https://github.com/discordeno/discordeno.git
synced 2026-06-16 11:28:15 +00:00
1st Review changes
This commit is contained in:
@@ -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),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user