import type { CommandContext, Message } from '..'; import { type Awaitable, type DeepPartial, type PickPartial, type When } from '../common'; import { EventHandler } from '../events'; import { type GatewayDispatchPayload, type GatewayPresenceUpdateData } from '../types'; import { ShardManager, type ShardManagerOptions } from '../websocket'; import { MemberUpdateHandler } from '../websocket/discord/events/memberUpdate'; import { PresenceUpdateHandler } from '../websocket/discord/events/presenceUpdate'; import type { BaseClientOptions, ServicesOptions, StartOptions } from './base'; import { BaseClient } from './base'; import { Collectors } from './collectors'; import { type AnySeyfertPlugin, type ExtendOf, type RegisteredPluginExtension, type RegisteredPlugins } from './plugins'; import { type ClientUserStructure, type MessageStructure } from './transformers'; declare class ClientBase extends BaseClient { gateway: ShardManager; me: When; options: Omit & { commands: NonNullable; }; memberUpdateHandler: MemberUpdateHandler; presenceUpdateHandler: PresenceUpdateHandler; collectors: Collectors; events: EventHandler; constructor(options?: ClientOptions); get applicationId(): When; set applicationId(id: string); setServices({ gateway, ...rest }: ServicesOptions & { gateway?: ShardManager; }): void; get latency(): number; private onShardDisconnect; private onShardReconnect; loadEvents(dir?: string): Promise; protected execute(options?: { token?: string; intents?: number; }): Promise; start(options?: Omit, 'httpConnection'>, execute?: boolean): Promise; protected onPacket(shardId: number, packet: GatewayDispatchPayload): Promise; private handleGatewaySendPayload; } type ClientPluginsOf = TPluginsOrReady extends readonly AnySeyfertPlugin[] ? TPluginsOrReady : RegisteredPlugins; type ClientReadyOf = TPluginsOrReady extends boolean ? TPluginsOrReady : Ready; type ClientAmbientExtensionOf = TPluginsOrReady extends readonly AnySeyfertPlugin[] ? {} : RegisteredPluginExtension; type ClientOptionsOf = TPluginsOrReady extends readonly AnySeyfertPlugin[] ? ClientOptions : ClientOptions; type Materialize = { [K in keyof T]: T[K]; }; export type Client = ClientBase> & ClientAmbientExtensionOf & Materialize>>; type ClientBaseStatics = Omit; export type ClientConstructor = ClientBaseStatics & { new (options?: ClientOptionsOf): Client; prototype: Client; }; export declare const Client: ClientConstructor; export interface ClientOptions extends BaseClientOptions { plugins?: TPlugins; presence?: (shardId: number) => GatewayPresenceUpdateData; shards?: { start: number; end: number; total?: number; }; gateway?: { properties?: Partial; compress?: ShardManagerOptions['compress']; }; commands?: BaseClientOptions['commands'] & { prefix?: (message: MessageStructure) => Awaitable; deferReplyResponse?: (ctx: CommandContext) => Awaitable[0]>; reply?: (ctx: CommandContext) => Awaitable; }; handlePayload?: ShardManagerOptions['handlePayload']; handleSendPayload?: ShardManagerOptions['handleSendPayload']; /** * @deprecated Use shard disconnect events instead. Injected ShardManager callbacks can double-fire. */ onShardDisconnect?: ShardManagerOptions['onShardDisconnect']; /** * @deprecated Use shard reconnect events instead. Injected ShardManager callbacks can double-fire. */ onShardReconnect?: ShardManagerOptions['onShardReconnect']; resharding?: PickPartial, 'getInfo'>; } export {};