feat: add getListeners method to Socket

This commit is contained in:
Derrick Hammer 2023-07-22 10:14:01 -04:00
parent 8c6b038f89
commit 0ec1dd1aac
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 4 additions and 0 deletions

View File

@ -253,6 +253,10 @@ export class Socket extends Client {
);
}
async getListeners() {
return this.callModuleReturn("socketListeners", { id: this.id });
}
private ensureEvent(event: string): void {
if (!(event in this.eventUpdates)) {
this.eventUpdates[event] = new Map<Function, DataFn>();