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 { EventEmitter } from 'node:events';
|
||||
|
||||
/**
|
||||
@@ -21,6 +22,12 @@ export interface VoiceUserData {
|
||||
userId: string;
|
||||
}
|
||||
|
||||
export interface SSRCMap extends EventEmitter {
|
||||
on(event: 'create', listener: (newData: VoiceUserData) => void): this;
|
||||
on(event: 'update', listener: (oldData: VoiceUserData | undefined, newData: VoiceUserData) => void): this;
|
||||
on(event: 'delete', listener: (deletedData: VoiceUserData) => void): this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Maps audio SSRCs to data of users in voice connections.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user