mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-10 16:43:31 +01:00
Simplify check in StreamDispatcher and add test voice bot
This commit is contained in:
@@ -215,7 +215,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 < 65535 ? data.sequence + 1 : 0;
|
||||
data.timestamp = data.timestamp + 4294967295 ? data.timestamp + 960 : 0;
|
||||
this.sendBuffer(buffer, data.sequence, data.timestamp);
|
||||
|
||||
@@ -231,6 +231,7 @@ class StreamDispatcher extends EventEmitter {
|
||||
this.destroyed = true;
|
||||
this.setSpeaking(false);
|
||||
this.emit(type, reason);
|
||||
if (type !== 'end') this.emit('end', `destroyed due to ${type} - ${reason}`);
|
||||
}
|
||||
|
||||
startStreaming() {
|
||||
|
||||
Reference in New Issue
Block a user