mirror of
https://github.com/YuzuZensai/Discord-Presence-Relay.git
synced 2026-09-14 01:08:50 +00:00
🔧 chore: Update dependencies
This commit is contained in:
@@ -21,7 +21,7 @@ export class MirrorConnection {
|
||||
|
||||
// Discord sends a READY dispatch after the handshake; only once that
|
||||
// arrives will it accept further commands like SET_ACTIVITY.
|
||||
this.sock.on('data', (chunk) => {
|
||||
this.sock.on('data', (chunk: Buffer) => {
|
||||
const hadFrames = this.reader.push(chunk).length > 0
|
||||
if (hadFrames && !this.ready) {
|
||||
this.ready = true
|
||||
|
||||
+2
-2
@@ -303,7 +303,7 @@ export class RpcRelay extends EventEmitter {
|
||||
let primaryConnected = false
|
||||
const pendingToPrimary: Buffer[] = []
|
||||
|
||||
client.on('data', (chunk) => {
|
||||
client.on('data', (chunk: Buffer) => {
|
||||
for (const frame of clientReader.push(chunk)) {
|
||||
if (frame.op === OP_HANDSHAKE) {
|
||||
handshakePayload = frame.payload
|
||||
@@ -326,7 +326,7 @@ export class RpcRelay extends EventEmitter {
|
||||
primaryConnected = true
|
||||
for (const encoded of pendingToPrimary.splice(0)) primary.write(encoded)
|
||||
|
||||
primary.on('data', (chunk) => {
|
||||
primary.on('data', (chunk: Buffer) => {
|
||||
for (const frame of primaryReader.push(chunk)) {
|
||||
if (client.writable) client.write(encodeFrame(frame.op, frame.payload))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user