refactor: make use of destructuring for Constants (#1942)

This commit is contained in:
SpaceEEC
2017-09-16 20:31:36 +02:00
committed by Crawl
parent 25ece1882b
commit ec4c98704f
66 changed files with 262 additions and 262 deletions

View File

@@ -1,5 +1,5 @@
const Action = require('./Action');
const Constants = require('../../util/Constants');
const { Events } = require('../../util/Constants');
class GuildRoleCreate extends Action {
handle(data) {
@@ -9,7 +9,7 @@ class GuildRoleCreate extends Action {
if (guild) {
const already = guild.roles.has(data.role.id);
role = guild.roles.create(data.role);
if (!already) client.emit(Constants.Events.GUILD_ROLE_CREATE, role);
if (!already) client.emit(Events.GUILD_ROLE_CREATE, role);
}
return { role };
}