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 b20010fdabb4..3972b16d1f50 100644 --- a/typings/index.d.ts +++ b/typings/index.d.ts @@ -2596,7 +2596,7 @@ declare module 'discord.js' { interface ChannelPosition { channel: ChannelResolvable; lockPermissions?: boolean; - parent?: CategoryChannelResolvable; + parent?: CategoryChannelResolvable | null; position?: number; }