mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-14 10:33:30 +01:00
Add new ESLint rules
This commit is contained in:
@@ -267,6 +267,7 @@ class VoiceBroadcast extends VolumeInterface {
|
||||
|
||||
_startPlaying() {
|
||||
if (this.tickInterval) clearInterval(this.tickInterval);
|
||||
// Old code?
|
||||
// this.tickInterval = this.client.setInterval(this.tick.bind(this), 20);
|
||||
this._startTime = Date.now();
|
||||
this._count = 0;
|
||||
|
||||
@@ -203,6 +203,7 @@ class StreamDispatcher extends VolumeInterface {
|
||||
|
||||
if (this.paused) {
|
||||
this.setSpeaking(false);
|
||||
// Old code?
|
||||
// data.timestamp = data.timestamp + 4294967295 ? data.timestamp + 960 : 0;
|
||||
data.pausedTime += data.length * 10;
|
||||
this.player.voiceConnection.voiceManager.client.setTimeout(() => this.process(), data.length * 10);
|
||||
|
||||
@@ -11,9 +11,7 @@ class BaseOpus {
|
||||
return buffer;
|
||||
}
|
||||
|
||||
destroy() {
|
||||
return;
|
||||
}
|
||||
destroy() {} // eslint-disable-line no-empty-function
|
||||
}
|
||||
|
||||
module.exports = BaseOpus;
|
||||
|
||||
@@ -7,9 +7,7 @@ class VoiceReadable extends Readable {
|
||||
this.open = true;
|
||||
}
|
||||
|
||||
_read() {
|
||||
return;
|
||||
}
|
||||
_read() {} // eslint-disable-line no-empty-function
|
||||
|
||||
_push(d) {
|
||||
if (this.open) this.push(d);
|
||||
|
||||
@@ -20,7 +20,7 @@ class VoiceReceiver extends EventEmitter {
|
||||
constructor(connection) {
|
||||
super();
|
||||
/*
|
||||
need a queue because we don't get the ssrc of the user speaking until after the first few packets,
|
||||
Need a queue because we don't get the ssrc of the user speaking until after the first few packets,
|
||||
so we queue up unknown SSRCs until they become known, then empty the queue.
|
||||
*/
|
||||
this.queues = new Map();
|
||||
@@ -68,7 +68,6 @@ class VoiceReceiver extends EventEmitter {
|
||||
if (!this.destroyed) return;
|
||||
this.voiceConnection.sockets.udp.socket.on('message', this._listener);
|
||||
this.destroyed = false;
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user