types(voice): bring back typed events (#8109)

This commit is contained in:
Skick
2022-06-23 17:39:36 +07:00
committed by GitHub
parent af04992ed3
commit 70b42bb64a
6 changed files with 77 additions and 5 deletions

View File

@@ -1,5 +1,13 @@
import { EventEmitter } from 'node:events';
export interface SpeakingMap extends EventEmitter {
/**
* Emitted when a user starts/stops speaking.
* @event
*/
on: (event: 'start' | 'end', listener: (userId: string) => void) => this;
}
/**
* Tracks the speaking states of users in a voice channel.
*/