Remove GuildDataStore and move towards storing data in Maps

This commit is contained in:
Amish Shah
2016-08-19 19:58:32 +01:00
parent 75ff9fb096
commit ed818d6e7f
13 changed files with 44 additions and 88 deletions

View File

@@ -9,9 +9,9 @@ class GuildRoleCreate extends Action {
const guild = client.store.get('guilds', data.guild_id);
if (guild) {
const already = guild.store.get('roles', data.role.id);
const already = guild.roles.get(data.role.id);
const role = new Role(guild, data.role);
guild.store.add('roles', role);
guild.roles.set(role.id, role);
if (!already) {
client.emit(Constants.Events.GUILD_ROLE_CREATE, guild, role);