mirror of
https://github.com/danbulant/discord.js
synced 2026-05-27 22:11:53 +00:00
enhanced setUserLimit to reset when passing null to stay consistent with other methods (#2083)
* added a new check to setUserLimit so it won't silently fail anymore if you put a wrong type in * adapt spaces idea of converting null to 0 * this way it looks cleaner * and i need to remove this * need to do it that way because like Gus said null will not change anyhting * space prooved me wrong and idk why ist working now
This commit is contained in:
parent
05a41b5ca4
commit
62544905a0
1 changed files with 1 additions and 1 deletions
|
|
@ -293,7 +293,7 @@ class GuildChannel extends Channel {
|
|||
topic: data.topic,
|
||||
nsfw: data.nsfw,
|
||||
bitrate: data.bitrate || (this.bitrate ? this.bitrate * 1000 : undefined),
|
||||
user_limit: data.userLimit != null ? data.userLimit : this.userLimit, // eslint-disable-line eqeqeq
|
||||
user_limit: typeof data.userLimit !== 'undefined' ? data.userLimit : this.userLimit,
|
||||
parent_id: data.parentID,
|
||||
lock_permissions: data.lockPermissions,
|
||||
permission_overwrites: data.permissionOverwrites,
|
||||
|
|
|
|||
Loading…
Reference in a new issue