From 399e720b92c11539f4d16a13e1b8190f136da6cc Mon Sep 17 00:00:00 2001 From: Jiralite <33201955+Jiralite@users.noreply.github.com> Date: Tue, 19 Oct 2021 15:11:29 +0100 Subject: [PATCH] feat: Add `rtcRegion` to `GuildManager#create()` (#6858) --- src/managers/GuildManager.js | 4 ++++ typings/index.d.ts | 1 + 2 files changed, 5 insertions(+) diff --git a/src/managers/GuildManager.js b/src/managers/GuildManager.js index 0a492aa35..48e9cb2dc 100644 --- a/src/managers/GuildManager.js +++ b/src/managers/GuildManager.js @@ -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 @@ -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') { diff --git a/typings/index.d.ts b/typings/index.d.ts index 8a0cd5b6b..b934dabae 100644 --- a/typings/index.d.ts +++ b/typings/index.d.ts @@ -4708,6 +4708,7 @@ export interface PartialChannelData { nsfw?: boolean; bitrate?: number; userLimit?: number; + rtcRegion?: string | null; permissionOverwrites?: PartialOverwriteData[]; rateLimitPerUser?: number; }