Added ability to edit a role

This commit is contained in:
Amish Shah
2016-07-03 16:27:04 +01:00
parent 3cd91a19aa
commit 0d53afe3ce
6 changed files with 131 additions and 12 deletions

View File

@@ -18,17 +18,7 @@ class GuildRoleUpdateHandler extends AbstractHandler {
let data = packet.d;
let client = this.packetManager.client;
let guild = client.store.get('guilds', data.guild_id);
if (guild) {
let existingRole = guild.store.get('roles', data.role.id);
if (existingRole) {
let oldRole = CloneObject(existingRole);
existingRole.setup(data.role);
client.emit(Constants.Events.GUILD_ROLE_UPDATE, guild, oldRole, existingRole);
}
}
let response = client.actions.GuildRoleUpdate.handle(data);
}
};