remove redundant editing (#1116)

* remove redundant editing

* update docs
This commit is contained in:
Gus Caplan
2017-01-19 11:11:24 -06:00
committed by Amish Shah
parent 1e6abe587b
commit 0300601649
2 changed files with 11 additions and 9 deletions

View File

@@ -323,8 +323,9 @@ class RESTMethods {
);
}
createGuildRole(guild) {
return this.rest.makeRequest('post', Constants.Endpoints.guildRoles(guild.id), true).then(role =>
createGuildRole(guild, data) {
if (data.color) data.color = this.client.resolver.resolveColor(data.color);
return this.rest.makeRequest('post', Constants.Endpoints.guildRoles(guild.id), true, data).then(role =>
this.client.actions.GuildRoleCreate.handle({
guild_id: guild.id,
role,