From 4b7d985f7ab899f8e2b9c334ca1f8b2a99827fe9 Mon Sep 17 00:00:00 2001 From: Monbrey Date: Sun, 13 Jun 2021 11:54:55 +1000 Subject: [PATCH] fix(Guild): setChannelPositions null parenting --- src/structures/Guild.js | 2 +- typings/index.d.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/structures/Guild.js b/src/structures/Guild.js index 8207bc8ec5e8..af0daba89d41 100644 --- a/src/structures/Guild.js +++ b/src/structures/Guild.js @@ -1141,7 +1141,7 @@ class Guild extends BaseGuild { id: this.client.channels.resolveID(r.channel), position: r.position, lock_permissions: r.lockPermissions, - parent_id: this.channels.resolveID(r.parent), + parent_id: typeof r.parent !== 'undefined' ? this.channels.resolveID(r.parent) : undefined, })); return this.client.api diff --git a/typings/index.d.ts b/typings/index.d.ts index 7266cf4b06a7..1c5117a3cd4f 100644 --- a/typings/index.d.ts +++ b/typings/index.d.ts @@ -2605,7 +2605,7 @@ declare module 'discord.js' { interface ChannelPosition { channel: ChannelResolvable; lockPermissions?: boolean; - parent?: CategoryChannelResolvable; + parent?: CategoryChannelResolvable | null; position?: number; }