Merge pull request #33331 from lolPants/master

[@types/discord-rpc] Add client ready/connected events
This commit is contained in:
Jesse Trinity
2019-02-25 17:31:24 -08:00
committed by GitHub
+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 {