mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-19 21:13:30 +01:00
feat: add support for using keyword on discord.js Client and WebSocketManager (#10063)
* feat: add support for `using` keyword on client * fix: use async dispose * feat: add support for web socket manager disposing * fix: use interface for client --------- Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
This commit is contained in:
3
packages/discord.js/typings/index.d.ts
vendored
3
packages/discord.js/typings/index.d.ts
vendored
@@ -517,7 +517,7 @@ export abstract class Base {
|
||||
public valueOf(): string;
|
||||
}
|
||||
|
||||
export class BaseClient extends EventEmitter {
|
||||
export class BaseClient extends EventEmitter implements AsyncDisposable {
|
||||
public constructor(options?: ClientOptions | WebhookClientOptions);
|
||||
private decrementMaxListeners(): void;
|
||||
private incrementMaxListeners(): void;
|
||||
@@ -526,6 +526,7 @@ export class BaseClient extends EventEmitter {
|
||||
public rest: REST;
|
||||
public destroy(): void;
|
||||
public toJSON(...props: Record<string, boolean | string>[]): unknown;
|
||||
public [Symbol.asyncDispose](): Promise<void>;
|
||||
}
|
||||
|
||||
export type GuildCacheMessage<Cached extends CacheType> = CacheTypeReducer<
|
||||
|
||||
Reference in New Issue
Block a user