diff --git a/src/stores/GuildChannelStore.js b/src/stores/GuildChannelStore.js index 1532f5920ab4..411734bd0b22 100644 --- a/src/stores/GuildChannelStore.js +++ b/src/stores/GuildChannelStore.js @@ -33,6 +33,7 @@ class GuildChannelStore extends DataStore { * @param {ChannelResolvable} [options.parent] Parent of the new channel * @param {OverwriteResolvable[]|Collection} [options.overwrites] * Permission overwrites of the new channel + * @param {number} [options.rateLimitPerUser] The ratelimit per user for the channel * @param {string} [options.reason] Reason for creating the channel * @returns {Promise} * @example @@ -52,7 +53,7 @@ class GuildChannelStore extends DataStore { * ], * }) */ - async create(name, { type, topic, nsfw, bitrate, userLimit, parent, overwrites, reason } = {}) { + async create(name, { type, topic, nsfw, bitrate, userLimit, parent, overwrites, rateLimitPerUser, reason } = {}) { if (parent) parent = this.client.channels.resolveID(parent); const data = await this.client.api.guilds(this.guild.id).channels.post({ @@ -65,6 +66,7 @@ class GuildChannelStore extends DataStore { user_limit: userLimit, parent_id: parent, permission_overwrites: overwrites && overwrites.map(o => PermissionOverwrites.resolve(o, this.guild)), + rate_limit_per_user: rateLimitPerUser, }, reason, }); diff --git a/typings/index.d.ts b/typings/index.d.ts index 8e66679b72d1..6a2fe4bf1092 100644 --- a/typings/index.d.ts +++ b/typings/index.d.ts @@ -1751,6 +1751,7 @@ declare module 'discord.js' { userLimit?: number; parent?: ChannelResolvable; overwrites?: OverwriteResolvable[] | Collection; + rateLimitPerUser?: number; reason?: string };