Add events for discord-rpc

This commit is contained in:
Jack Baron
2019-02-22 22:21:16 +00:00
parent 0d4dfe2e46
commit 9143994ad5
+5
View File
@@ -1,6 +1,7 @@
// Type definitions for discord-rpc 3.0
// Project: https://github.com/discordjs/RPC#readme
// Definitions by: Jason Bothell <https://github.com/jasonhaxstuff>
// Jack Baron <https://github.com/lolPants>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
import { EventEmitter } from 'events';
@@ -66,6 +67,10 @@ export class Client extends EventEmitter {
subscribe(event: string, args: any, callback: (data: any) => void): Promise<Subscription>;
destroy(): Promise<void>;
on(event: 'ready' | 'connected', listener: () => void): this;
once(event: 'ready' | 'connected', listener: () => void): this;
off(event: 'ready' | 'connected', listener: () => void): this;
}
export interface RPCClientOptions {