mirror of
https://github.com/danbulant/discord.js
synced 2026-05-27 22:11:53 +00:00
feat(Guild): add position to createChannel's implementation (#3058)
This commit is contained in:
parent
890b1be714
commit
7bc2e231cf
1 changed files with 13 additions and 1 deletions
|
|
@ -261,7 +261,18 @@ class RESTMethods {
|
|||
}
|
||||
|
||||
createChannel(guild, name, options) {
|
||||
const { type, topic, nsfw, bitrate, userLimit, parent, permissionOverwrites, rateLimitPerUser, reason } = options;
|
||||
const {
|
||||
type,
|
||||
topic,
|
||||
nsfw,
|
||||
bitrate,
|
||||
userLimit,
|
||||
parent,
|
||||
permissionOverwrites,
|
||||
position,
|
||||
rateLimitPerUser,
|
||||
reason,
|
||||
} = options;
|
||||
return this.rest.makeRequest('post', Endpoints.Guild(guild).channels, true, {
|
||||
name,
|
||||
topic,
|
||||
|
|
@ -271,6 +282,7 @@ class RESTMethods {
|
|||
user_limit: userLimit,
|
||||
parent_id: parent instanceof Channel ? parent.id : parent,
|
||||
permission_overwrites: resolvePermissions.call(this, permissionOverwrites, guild),
|
||||
position,
|
||||
rate_limit_per_user: rateLimitPerUser,
|
||||
},
|
||||
undefined,
|
||||
|
|
|
|||
Loading…
Reference in a new issue