mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-10 00:23:30 +01:00
fix(Voice): only skip undocumented voice packet byte if present (#5309)
* fix(Voice*): Only skip undocumented byte if present * fix linting errors
This commit is contained in:
@@ -72,8 +72,9 @@ class PacketHandler extends EventEmitter {
|
||||
if (byte === 0) continue;
|
||||
offset += 1 + (0b1111 & (byte >> 4));
|
||||
}
|
||||
// Skip over undocumented Discord byte
|
||||
offset++;
|
||||
// Skip over undocumented Discord byte (if present)
|
||||
const byte = packet.readUInt8(offset);
|
||||
if (byte === 0x00 || byte === 0x02) offset++;
|
||||
|
||||
packet = packet.slice(offset);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user