Skip to content

Shard

Signature

export declare class Shard

Properties

isOpenGetter
get isOpen(): boolean;

Methods

ping(): Promise<number>;
end(reason?: string): void;

Requests a normal (1000) close and prevents this shard from reconnecting. The session is invalidated when Discord receives the close frame.

close(code: number, reason: string): void;
protected handleMessage(data: string | Buffer): Promise<void> | undefined;