BaseClient
Signature
export declare class BaseClientProperties
64restcacheapplicationsuserschannelsguildsmessagesmemberswebhookstemplatesrolesreactionsemojisthreadsbansinteractionsvoiceStatessoundboardsinvitesdebuggerloggerlangscommandscomponentshandleCommand_applicationId_botIdmiddlewarespluginssharedeventspluginsSetupPromisepluginsClosePromiselangBaseValuespluginCacheDisabledCachepluginBaseGatewayIntentspluginComponentsBeforeLoadDepthoptionsproxybotIdbotIdapplicationIdapplicationIdbindPluginRestObserverProviderbindPluginLangReloadrefreshPluginCacheResourcesreloadPluginMiddlewaresreloadPluginCommandsreloadPluginComponentssetupPluginsapplyPluginCommandsloadedCommandsapplyPluginComponentscreatePluginCommandInstancecreatePluginComponentInstancerunPluginHandlerCreatorsmatchesPluginHandlerKindcreatePluginLoadedMetadataemitPluginCustomEventshouldUploadCommandssyncCachePathcachedCommandGuildsemitUploadCommandsMetadataapplyPluginLangs
Methods
17Properties
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;debugger?: Logger;logger: Logger;langs: LangsHandler;commands: CommandHandler;components: ComponentHandler;handleCommand: HandleCommand;private _applicationId?;private _botId?;middlewares?: ClientMiddlewares;readonly plugins: ResolvedPluginList;shared: PluginSharedRegistry;events: CustomEventRunner;private pluginsSetupPromise?;private pluginsClosePromise?;private langBaseValues;private pluginCacheDisabledCache;private pluginBaseGatewayIntents;private pluginComponentsBeforeLoadDepth;options: BaseClientOptions;proxyGetterget proxy(): APIRoutes;botIdSetterset botId(id: string);botIdGetterget botId(): string;applicationIdSetterset applicationId(id: string);applicationIdGetterget applicationId(): string;private bindPluginRestObserverProvider;private bindPluginLangReload;private refreshPluginCacheResources;private reloadPluginMiddlewares;private reloadPluginCommands;private reloadPluginComponents;private setupPlugins;private applyPluginCommands;loadedCommandsGetterprivate get loadedCommands();private applyPluginComponents;private createPluginCommandInstance;private createPluginComponentInstance;private runPluginHandlerCreators;private matchesPluginHandlerKind;private createPluginLoadedMetadata;private emitPluginCustomEvent;private shouldUploadCommands;private syncCachePath;private cachedCommandGuilds;private emitUploadCommandsMetadata;private applyPluginLangs;Methods
protected static getBotIdFromToken(token: string): string;constructorConstructorconstructor(options?: BaseClientOptions);protected configureLogger(defaults: LoggerOptions, options?: LoggerOptions): void;setServices({ rest, cache, langs, middlewares, handleCommand }: ServicesOptions): void;protected execute(..._options: unknown[]): Promise<void>;start(options?: Pick<DeepPartial<StartOptions>, 'langsDir' | 'commandsDir' | 'connection' | 'token' | 'componentsDir'>): Promise<void>;reloadPluginContributions(): Promise<void>;protected resolvePluginGatewayIntents(base?: GatewayIntentInput): number;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.
protected onPacket(..._packet: unknown[]): Promise<any>;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>;