mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-10 00:23:30 +01: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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user