ESLint stuff...

This commit is contained in:
Amish Shah
2016-08-13 14:44:49 +01:00
parent 53d767ec04
commit b8db4c4f4b
74 changed files with 2574 additions and 2956 deletions

View File

@@ -1,38 +1,31 @@
'use strict';
const Action = require('./Action');
const Constants = require('../../util/Constants');
const Role = require('../../structures/Role');
class GuildRoleCreate extends Action {
constructor(client) {
super(client);
}
handle(data) {
const client = this.client;
const guild = client.store.get('guilds', data.guild_id);
handle(data) {
if (guild) {
const already = guild.store.get('roles', data.role.id);
const role = new Role(guild, data.role);
guild.store.add('roles', role);
let client = this.client;
let guild = client.store.get('guilds', data.guild_id);
if (!already) {
client.emit(Constants.Events.GUILD_ROLE_CREATE, guild, role);
}
if (guild) {
let already = guild.store.get('roles', data.role.id);
let role = new Role(guild, data.role);
guild.store.add('roles', role);
return {
role,
};
}
if (!already) {
client.emit(Constants.Events.GUILD_ROLE_CREATE, guild, role);
}
return {
role,
};
}
return {
role: null,
};
}
};
return {
role: null,
};
}
}
module.exports = GuildRoleCreate;