mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-10 08:33:30 +01:00
fix: don't patch set data with undefined (#6694)
This commit is contained in:
@@ -12,23 +12,29 @@ class BaseGuildVoiceChannel extends GuildChannel {
|
||||
_patch(data) {
|
||||
super._patch(data);
|
||||
|
||||
/**
|
||||
* The RTC region for this voice-based channel. This region is automatically selected if `null`.
|
||||
* @type {?string}
|
||||
*/
|
||||
this.rtcRegion = data.rtc_region;
|
||||
if ('rtc_region' in data) {
|
||||
/**
|
||||
* The RTC region for this voice-based channel. This region is automatically selected if `null`.
|
||||
* @type {?string}
|
||||
*/
|
||||
this.rtcRegion = data.rtc_region;
|
||||
}
|
||||
|
||||
/**
|
||||
* The bitrate of this voice-based channel
|
||||
* @type {number}
|
||||
*/
|
||||
this.bitrate = data.bitrate;
|
||||
if ('bitrate' in data) {
|
||||
/**
|
||||
* The bitrate of this voice-based channel
|
||||
* @type {number}
|
||||
*/
|
||||
this.bitrate = data.bitrate;
|
||||
}
|
||||
|
||||
/**
|
||||
* The maximum amount of users allowed in this channel.
|
||||
* @type {number}
|
||||
*/
|
||||
this.userLimit = data.user_limit;
|
||||
if ('user_limit' in data) {
|
||||
/**
|
||||
* The maximum amount of users allowed in this channel.
|
||||
* @type {number}
|
||||
*/
|
||||
this.userLimit = data.user_limit;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user