mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-13 10:03:31 +01:00
types(voice): bring back typed events (#8109)
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
/* eslint-disable @typescript-eslint/method-signature-style */
|
||||
import { createSocket, Socket } from 'node:dgram';
|
||||
import { EventEmitter } from 'node:events';
|
||||
import { isIPv4 } from 'node:net';
|
||||
@@ -50,6 +51,13 @@ const KEEP_ALIVE_LIMIT = 12;
|
||||
*/
|
||||
const MAX_COUNTER_VALUE = 2 ** 32 - 1;
|
||||
|
||||
export interface VoiceUDPSocket extends EventEmitter {
|
||||
on(event: 'error', listener: (error: Error) => void): this;
|
||||
on(event: 'close', listener: () => void): this;
|
||||
on(event: 'debug', listener: (message: string) => void): this;
|
||||
on(event: 'message', listener: (message: Buffer) => void): this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Manages the UDP networking for a voice connection.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user