mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-16 11:33:30 +01:00
feature: public raw events (#3159)
* add a public alternative to the private raw event while retaining raw for use in debugging privately * only emit dispatch packets * requested changes TIL, that's neat * fix padding * requested changes * Update WebSocketManager.js
This commit is contained in:
4
typings/index.d.ts
vendored
4
typings/index.d.ts
vendored
@@ -1291,7 +1291,7 @@ declare module 'discord.js' {
|
||||
constructor(id: string, token: string, options?: ClientOptions);
|
||||
}
|
||||
|
||||
export class WebSocketManager {
|
||||
export class WebSocketManager extends EventEmitter {
|
||||
constructor(client: Client);
|
||||
private totalShards: number | string;
|
||||
private shardQueue: Set<WebSocketShard>;
|
||||
@@ -1306,6 +1306,8 @@ declare module 'discord.js' {
|
||||
public status: Status;
|
||||
public readonly ping: number;
|
||||
|
||||
public on(event: WSEventType, listener: (data: any, shardID: number) => void): this;
|
||||
public once(event: WSEventType, listener: (data: any, shardID: number) => void): this;
|
||||
private debug(message: string, shard?: WebSocketShard): void;
|
||||
private connect(): Promise<void>;
|
||||
private createShards(): Promise<void>;
|
||||
|
||||
Reference in New Issue
Block a user