Skip to content

Commit

Permalink
feat: Add rtcRegion to GuildManager#create() (#6858)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jiralite committed Oct 19, 2021
1 parent e0afcad commit 399e720
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/managers/GuildManager.js
Expand Up @@ -91,6 +91,7 @@ class GuildManager extends CachedManager {
* @property {boolean} [nsfw] Whether the channel is NSFW
* @property {number} [bitrate] The bitrate of the voice channel
* @property {number} [userLimit] The user limit of the channel
* @property {?string} [rtcRegion] The RTC region of the channel
* @property {PartialOverwriteData[]} [permissionOverwrites]
* Overwrites of the channel
* @property {number} [rateLimitPerUser] The rate limit per user (slowmode) of the channel in seconds
Expand Down Expand Up @@ -196,6 +197,9 @@ class GuildManager extends CachedManager {
delete channel.userLimit;
channel.rate_limit_per_user = channel.rateLimitPerUser;
delete channel.rateLimitPerUser;
channel.rtc_region = channel.rtcRegion;
delete channel.rtcRegion;

if (!channel.permissionOverwrites) continue;
for (const overwrite of channel.permissionOverwrites) {
if (typeof overwrite.type === 'string') {
Expand Down
1 change: 1 addition & 0 deletions typings/index.d.ts
Expand Up @@ -4708,6 +4708,7 @@ export interface PartialChannelData {
nsfw?: boolean;
bitrate?: number;
userLimit?: number;
rtcRegion?: string | null;
permissionOverwrites?: PartialOverwriteData[];
rateLimitPerUser?: number;
}
Expand Down

0 comments on commit 399e720

Please sign in to comment.