Cleanup Part 2: Electric Boogaloo (Reloaded) (#594)

* Cleanup Part 2: Electric Boogaloo (Reloaded)

* Moar cleanup

* Tweak NOT_A_PERMISSION error
This commit is contained in:
Schuyler Cebulskie
2016-09-04 05:08:09 -04:00
committed by Amish Shah
parent 5a9c42061f
commit 0b908f5bce
95 changed files with 946 additions and 1526 deletions

View File

@@ -67,7 +67,7 @@ exports.Errors = {
NO_BOT_ACCOUNT: new Error('you should ideally be using a bot account!'),
BAD_WS_MESSAGE: new Error('a bad message was received from the websocket - bad compression or not json'),
TOOK_TOO_LONG: new Error('something took too long to do'),
NOT_A_PERMISSION: new Error('that is not a valid permission number'),
NOT_A_PERMISSION: new Error('that is not a valid permission string or number'),
INVALID_RATE_LIMIT_METHOD: new Error('unknown rate limiting method'),
BAD_LOGIN: new Error('incorrect login details were provided'),
};
@@ -235,10 +235,7 @@ const PermissionFlags = exports.PermissionFlags = {
};
let _ALL_PERMISSIONS = 0;
for (const key in PermissionFlags) {
_ALL_PERMISSIONS |= PermissionFlags[key];
}
for (const key in PermissionFlags) _ALL_PERMISSIONS |= PermissionFlags[key];
exports.ALL_PERMISSIONS = _ALL_PERMISSIONS;