From 8ac664801c38e7fe59b2ea4a6c930a88ff1f707e Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Sat, 11 Aug 2018 11:34:24 +0100 Subject: [PATCH] GuildChannel#setParent should allow channel to be a Snowflake (#2644) --- src/structures/GuildChannel.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/structures/GuildChannel.js b/src/structures/GuildChannel.js index fcdbab224..287ee7a87 100644 --- a/src/structures/GuildChannel.js +++ b/src/structures/GuildChannel.js @@ -391,7 +391,7 @@ class GuildChannel extends Channel { */ setParent(channel, { lockPermissions = true, reason } = {}) { return this.edit({ - parentID: channel !== null ? channel.id ? channel.id : channel : null, + parentID: channel !== null ? channel.hasOwnProperty('id') ? channel.id : channel : null, lockPermissions, }, reason); }