Client
Gateway client instance, including registered plugin extensions.
Signature
export type Client<TPluginsOrReady extends readonly AnySeyfertPlugin[] | boolean = RegisteredPlugins, Ready extends boolean = boolean> = ClientBase<ClientReadyOf<TPluginsOrReady, Ready>> & ClientAmbientExtensionOf<TPluginsOrReady> & Materialize<ExtendOf<ClientPluginsOf<TPluginsOrReady>>>;Private types
ClientReadyOfTypeAlias
type ClientReadyOf<TPluginsOrReady extends readonly AnySeyfertPlugin[] | boolean, Ready extends boolean> = TPluginsOrReady extends boolean ? TPluginsOrReady : Ready;ClientAmbientExtensionOfTypeAlias
type ClientAmbientExtensionOf<TPluginsOrReady extends readonly AnySeyfertPlugin[] | boolean> = TPluginsOrReady extends readonly AnySeyfertPlugin[] ? {} : RegisteredPluginExtension;MaterializeTypeAlias
type Materialize<T> = { [K in keyof T]: T[K];};ClientPluginsOfTypeAlias
type ClientPluginsOf<TPluginsOrReady extends readonly AnySeyfertPlugin[] | boolean> = TPluginsOrReady extends readonly AnySeyfertPlugin[] ? TPluginsOrReady : RegisteredPlugins;Properties
43gatewaymeoptionsmemberUpdateHandlerpresenceUpdateHandlercollectorseventsapplicationIdapplicationIdlatencyrestcacheapplicationsuserschannelsguildsmessagesmemberswebhookstemplatesrolesreactionsemojisthreadsbansinteractionsvoiceStatessoundboardsinvitesstageInstancesmonetizationdebuggerloggerlangscommandscomponentshandleCommandmiddlewarespluginssharedproxybotIdbotId
Methods
12Properties
gateway: ShardManager;me: When<Ready, ClientUserStructure>;options: Omit<ClientOptions, 'commands'> & { commands: NonNullable<ClientOptions['commands']>;};memberUpdateHandler: MemberUpdateHandler;presenceUpdateHandler: PresenceUpdateHandler;collectors: Collectors;events: EventHandler;applicationIdGetterget applicationId(): When<Ready, string, ''>;applicationIdSetterset applicationId(id: string);latencyGetterget latency(): number;rest: ApiHandler<this>;cache: Cache;applications: ApplicationShorter;users: UsersShorter;channels: ChannelShorter;guilds: GuildShorter;messages: MessageShorter;members: MemberShorter;webhooks: WebhookShorter;templates: TemplateShorter;roles: RoleShorter;reactions: ReactionShorter;emojis: EmojiShorter;threads: ThreadShorter;bans: BanShorter;interactions: InteractionShorter;voiceStates: VoiceStateShorter;soundboards: SoundboardShorter;invites: InvitesShorter;stageInstances: StageInstanceShorter;monetization: MonetizationShorter;debugger?: Logger;logger: Logger;langs: LangsHandler;commands: CommandHandler;components: ComponentHandler;handleCommand: HandleCommand;middlewares?: ClientMiddlewares;readonly plugins: ResolvedPluginList;shared: PluginSharedRegistry;proxyGetterget proxy(): APIRoutes;botIdSetterset botId(id: string);botIdGetterget botId(): string;Methods
setServices({ gateway, ...rest }: ServicesOptions & { gateway?: ShardManager;}): void;loadEvents(dir?: string): Promise<void>;start(options?: Omit<DeepPartial<StartOptions>, 'httpConnection'>, execute?: boolean): Promise<void>;reloadPluginContributions(): Promise<void>;close(): Promise<void>;Closes resources managed by the plugin lifecycle. This waits for in-flight plugin setup and runs `SeyfertPlugin.teardown`. It does not close the gateway, REST client, or cache adapter.
onInteractionRequest(rawBody: APIInteraction): Promise<{ headers: { 'Content-Type'?: string; }; response: APIInteractionResponse | FormData;}>;Parameters
rawBody- body of interaction
Returns
uploadCommands({ applicationId, cachePath }?: { applicationId?: string; cachePath?: string;}): Promise<void>;loadCommands(dir?: string): Promise<void>;loadComponents(dir?: string): Promise<void>;loadLangs(dir?: string): Promise<void>;t(locale: string): SeyfertLocale;getRC<T extends InternalRuntimeConfigHTTP | InternalRuntimeConfig = InternalRuntimeConfigHTTP | InternalRuntimeConfig>(): Promise<ResolvedRC>;