mirror of
https://github.com/discordeno/discordeno.git
synced 2026-06-16 11:28:15 +00:00
Bug fix
This commit is contained in:
@@ -440,15 +440,15 @@ export async function editChannelOverwrite(
|
|||||||
const { allow, deny, ...info } = overwrite;
|
const { allow, deny, ...info } = overwrite;
|
||||||
let channel = cache.channels.get(channelID);
|
let channel = cache.channels.get(channelID);
|
||||||
|
|
||||||
if (!channel) return Errors.CHANNEL_NOT_FOUND;
|
if (!channel) throw new Error(Errors.CHANNEL_NOT_FOUND);
|
||||||
|
|
||||||
const payload = {
|
const payload = {
|
||||||
permission_overwrites: [
|
permission_overwrites: [
|
||||||
...(channel?.permissionOverwrites || []).map((ro) => ({
|
...(channel?.permissionOverwrites || []).map((rawOverwrite) => ({
|
||||||
id: ro.id,
|
id: rawOverwrite.id,
|
||||||
type: ro.type,
|
type: rawOverwrite.type,
|
||||||
allow: ro.allow,
|
allow: rawOverwrite.allow,
|
||||||
deny: ro.deny,
|
deny: rawOverwrite.deny,
|
||||||
})),
|
})),
|
||||||
{
|
{
|
||||||
...info,
|
...info,
|
||||||
|
|||||||
Reference in New Issue
Block a user