mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-17 20:13:30 +01:00
feat(GuildChannelManager): add 'rtcRegion' option to 'create' method (#6849)
Co-authored-by: Vlad Frangu <kingdgrizzle@gmail.com>
This commit is contained in:
@@ -121,7 +121,19 @@ class GuildChannelManager extends CachedManager {
|
|||||||
*/
|
*/
|
||||||
async create(
|
async create(
|
||||||
name,
|
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);
|
parent &&= this.client.channels.resolveId(parent);
|
||||||
permissionOverwrites &&= permissionOverwrites.map(o => PermissionOverwrites.resolve(o, this.guild));
|
permissionOverwrites &&= permissionOverwrites.map(o => PermissionOverwrites.resolve(o, this.guild));
|
||||||
@@ -138,6 +150,7 @@ class GuildChannelManager extends CachedManager {
|
|||||||
position,
|
position,
|
||||||
permission_overwrites: permissionOverwrites,
|
permission_overwrites: permissionOverwrites,
|
||||||
rate_limit_per_user: rateLimitPerUser,
|
rate_limit_per_user: rateLimitPerUser,
|
||||||
|
rtc_region: rtcRegion,
|
||||||
},
|
},
|
||||||
reason,
|
reason,
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -39,6 +39,7 @@ class CategoryChannel extends GuildChannel {
|
|||||||
* Permission overwrites of the new channel
|
* Permission overwrites of the new channel
|
||||||
* @property {number} [position] Position 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 {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
|
* @property {string} [reason] Reason for creating the new channel
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
1
typings/index.d.ts
vendored
1
typings/index.d.ts
vendored
@@ -3419,6 +3419,7 @@ export interface CategoryCreateChannelOptions {
|
|||||||
userLimit?: number;
|
userLimit?: number;
|
||||||
rateLimitPerUser?: number;
|
rateLimitPerUser?: number;
|
||||||
position?: number;
|
position?: number;
|
||||||
|
rtcRegion?: string;
|
||||||
reason?: string;
|
reason?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user