Skip to content

Commit

Permalink
feat(GuildChannelManager): add 'rtcRegion' option to 'create' method (#…
Browse files Browse the repository at this point in the history
…6849)

Co-authored-by: Vlad Frangu <kingdgrizzle@gmail.com>
  • Loading branch information
skick1234 and vladfrangu committed Oct 17, 2021
1 parent 7513b45 commit 487d32d
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
15 changes: 14 additions & 1 deletion src/managers/GuildChannelManager.js
Expand Up @@ -121,7 +121,19 @@ class GuildChannelManager extends CachedManager {
*/
async create(
name,
{ type, topic, nsfw, bitrate, userLimit, parent, permissionOverwrites, position, rateLimitPerUser, reason } = {},
{
type,
topic,
nsfw,
bitrate,
userLimit,
parent,
permissionOverwrites,
position,
rateLimitPerUser,
rtcRegion,
reason,
} = {},
) {
parent &&= this.client.channels.resolveId(parent);
permissionOverwrites &&= permissionOverwrites.map(o => PermissionOverwrites.resolve(o, this.guild));
Expand All @@ -138,6 +150,7 @@ class GuildChannelManager extends CachedManager {
position,
permission_overwrites: permissionOverwrites,
rate_limit_per_user: rateLimitPerUser,
rtc_region: rtcRegion,
},
reason,
});
Expand Down
1 change: 1 addition & 0 deletions src/structures/CategoryChannel.js
Expand Up @@ -39,6 +39,7 @@ class CategoryChannel extends GuildChannel {
* Permission overwrites of the new channel
* @property {number} [position] Position of the new channel
* @property {number} [rateLimitPerUser] The rate limit per user (slowmode) for the new channel in seconds
* @property {string} [rtcRegion] The specific region of the new channel.
* @property {string} [reason] Reason for creating the new channel
*/

Expand Down
1 change: 1 addition & 0 deletions typings/index.d.ts
Expand Up @@ -3419,6 +3419,7 @@ export interface CategoryCreateChannelOptions {
userLimit?: number;
rateLimitPerUser?: number;
position?: number;
rtcRegion?: string;
reason?: string;
}

Expand Down

0 comments on commit 487d32d

Please sign in to comment.