Refactored static resolvers to Util (#1517)

* ready event will now throw errors properly

* ws login rejection fix

* moved static resolves to util
This commit is contained in:
Drahcirius
2017-05-23 06:18:18 -04:00
committed by Crawl
parent 7309e367f1
commit 4292134647
8 changed files with 97 additions and 108 deletions

View File

@@ -1,5 +1,6 @@
const Snowflake = require('../util/Snowflake');
const Permissions = require('../util/Permissions');
const Util = require('../util/Util');
/**
* Represents a role on Discord.
@@ -205,7 +206,7 @@ class Role {
data: {
name: data.name || this.name,
position: typeof data.position !== 'undefined' ? data.position : this.position,
color: this.client.resolver.resolveColor(data.color || this.color),
color: Util.resolveColor(data.color || this.color),
hoist: typeof data.hoist !== 'undefined' ? data.hoist : this.hoist,
mentionable: typeof data.mentionable !== 'undefined' ? data.mentionable : this.mentionable,
},