mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-16 03:23:29 +01:00
GuildChannel#setParent should allow channel to be a Snowflake (#2644)
This commit is contained in:
@@ -391,7 +391,7 @@ class GuildChannel extends Channel {
|
|||||||
*/
|
*/
|
||||||
setParent(channel, { lockPermissions = true, reason } = {}) {
|
setParent(channel, { lockPermissions = true, reason } = {}) {
|
||||||
return this.edit({
|
return this.edit({
|
||||||
parentID: channel !== null ? channel.id ? channel.id : channel : null,
|
parentID: channel !== null ? channel.hasOwnProperty('id') ? channel.id : channel : null,
|
||||||
lockPermissions,
|
lockPermissions,
|
||||||
}, reason);
|
}, reason);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user