mirror of
https://github.com/discordjs/discord.js.git
synced 2024-08-21 11:14:43 +12:00
Fix ESLint warnings
This commit is contained in:
parent
d6f55adf52
commit
73261646fc
5 changed files with 7 additions and 5 deletions
|
@ -80,6 +80,7 @@
|
|||
"consistent-this": ["error", "$this"],
|
||||
"eol-last": "error",
|
||||
"func-names": "error",
|
||||
"func-name-matching": "error",
|
||||
"func-style": ["error", "declaration", { "allowArrowFunctions": true }],
|
||||
"indent": ["error", 2, { "SwitchCase": 1 }],
|
||||
"key-spacing": "error",
|
||||
|
@ -122,6 +123,7 @@
|
|||
"no-useless-computed-key": "error",
|
||||
"no-useless-constructor": "error",
|
||||
"prefer-arrow-callback": "error",
|
||||
"prefer-numeric-literals": "error",
|
||||
"prefer-rest-params": "error",
|
||||
"prefer-spread": "error",
|
||||
"prefer-template": "error",
|
||||
|
|
|
@ -31,11 +31,11 @@
|
|||
"ws": "^1.1.1"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"node-opus": "^0.2.1",
|
||||
"node-opus": "^0.2.2",
|
||||
"opusscript": "^0.0.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"eslint": "^3.8.0",
|
||||
"eslint": "^3.9.0",
|
||||
"fs-extra": "^0.30.0",
|
||||
"jsdoc-to-markdown": "^2.0.0"
|
||||
},
|
||||
|
|
|
@ -223,7 +223,7 @@ class StreamDispatcher extends EventEmitter {
|
|||
buffer = this._applyVolume(buffer);
|
||||
|
||||
data.count++;
|
||||
data.sequence = (data.sequence + 1) < (65536) ? data.sequence + 1 : 0;
|
||||
data.sequence = (data.sequence + 1) < 65536 ? data.sequence + 1 : 0;
|
||||
data.timestamp = data.timestamp + 4294967295 ? data.timestamp + 960 : 0;
|
||||
|
||||
this._sendBuffer(buffer, data.sequence, data.timestamp);
|
||||
|
|
|
@ -70,7 +70,7 @@ class GuildChannel extends Channel {
|
|||
permissions |= overwrite.allowData;
|
||||
}
|
||||
|
||||
const admin = Boolean(permissions & (Constants.PermissionFlags.ADMINISTRATOR));
|
||||
const admin = Boolean(permissions & Constants.PermissionFlags.ADMINISTRATOR);
|
||||
if (admin) permissions = Constants.ALL_PERMISSIONS;
|
||||
|
||||
return new EvaluatedPermissions(member, permissions);
|
||||
|
|
|
@ -187,7 +187,7 @@ class GuildMember {
|
|||
const roles = this.roles;
|
||||
for (const role of roles.values()) permissions |= role.permissions;
|
||||
|
||||
const admin = Boolean(permissions & (Constants.PermissionFlags.ADMINISTRATOR));
|
||||
const admin = Boolean(permissions & Constants.PermissionFlags.ADMINISTRATOR);
|
||||
if (admin) permissions = Constants.ALL_PERMISSIONS;
|
||||
|
||||
return new EvaluatedPermissions(this, permissions);
|
||||
|
|
Loading…
Reference in a new issue