mirror of
https://github.com/danbulant/discord.js
synced 2026-05-29 20:30:38 +00:00
backport(Guild): support for rateLimitPerUser when creating a channel
PR: #2878
Commit: 8ec3b5134d
This commit is contained in:
parent
6aa7792097
commit
691aaef07e
1 changed files with 3 additions and 1 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue