mirror of
https://github.com/danbulant/discord.js
synced 2026-07-06 19:50:55 +00:00
Webpack build for branch master: e08f2bad30
This commit is contained in:
parent
77b1591cb4
commit
359fb24883
2 changed files with 5 additions and 4 deletions
|
|
@ -4801,7 +4801,7 @@ class Guild {
|
||||||
* .then(role => console.log(`Created role ${role}`))
|
* .then(role => console.log(`Created role ${role}`))
|
||||||
* .catch(console.error)
|
* .catch(console.error)
|
||||||
*/
|
*/
|
||||||
createRole(data) {
|
createRole(data = {}) {
|
||||||
return this.client.rest.methods.createGuildRole(this, data);
|
return this.client.rest.methods.createGuildRole(this, data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -17027,6 +17027,7 @@ class RESTMethods {
|
||||||
|
|
||||||
createGuildRole(guild, data) {
|
createGuildRole(guild, data) {
|
||||||
if (data.color) data.color = this.client.resolver.resolveColor(data.color);
|
if (data.color) data.color = this.client.resolver.resolveColor(data.color);
|
||||||
|
if (data.permissions) data.permissions = Permissions.resolve(data.permissions);
|
||||||
return this.rest.makeRequest('post', Constants.Endpoints.guildRoles(guild.id), true, data).then(role =>
|
return this.rest.makeRequest('post', Constants.Endpoints.guildRoles(guild.id), true, data).then(role =>
|
||||||
this.client.actions.GuildRoleCreate.handle({
|
this.client.actions.GuildRoleCreate.handle({
|
||||||
guild_id: guild.id,
|
guild_id: guild.id,
|
||||||
|
|
|
||||||
6
discord.master.min.js
vendored
6
discord.master.min.js
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue