mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
backport(Guild): support for rateLimitPerUser when creating a channel
PR: #2878
Commit: 8ec3b5134d
This commit is contained in:
@@ -260,7 +260,8 @@ class RESTMethods {
|
||||
});
|
||||
}
|
||||
|
||||
createChannel(guild, name, { type, topic, nsfw, bitrate, userLimit, parent, permissionOverwrites, reason }) {
|
||||
createChannel(guild, name, options) {
|
||||
const { type, topic, nsfw, bitrate, userLimit, parent, permissionOverwrites, rateLimitPerUser, reason } = options;
|
||||
return this.rest.makeRequest('post', Endpoints.Guild(guild).channels, true, {
|
||||
name,
|
||||
topic,
|
||||
@@ -270,6 +271,7 @@ class RESTMethods {
|
||||
user_limit: userLimit,
|
||||
parent_id: parent instanceof Channel ? parent.id : parent,
|
||||
permission_overwrites: resolvePermissions.call(this, permissionOverwrites, guild),
|
||||
rate_limit_per_user: rateLimitPerUser,
|
||||
},
|
||||
undefined,
|
||||
reason).then(data => this.client.actions.ChannelCreate.handle(data).channel);
|
||||
|
||||
Reference in New Issue
Block a user