@seedcord/gateway 0.1.0-next.0 → 0.1.0-next.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +230 -353
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +44 -107
- package/dist/index.mjs +197 -329
- package/dist/index.mjs.map +1 -1
- package/package.json +11 -10
package/dist/index.d.mts
CHANGED
|
@@ -1,16 +1,20 @@
|
|
|
1
|
-
import { BuilderComponent, CoreBase, Gate, GateContextBase, GateNoticeOptions, MessageContextMenuRegistry, Notice, OptionKind, PageView, RegisterCommand, RequiredOf, SlashOptionRegistry, UserContextMenuRegistry } from "@seedcord/core";
|
|
1
|
+
import { BuilderComponent, CoreBase, DispatchContext, Gate, GateContextBase, GateNoticeOptions, MessageContextMenuRegistry, Notice, OptionKind, PageView, RegisterCommand, RequiredOf, SlashOptionRegistry, UserContextMenuRegistry } from "@seedcord/core";
|
|
2
2
|
import { AnyCustomId, DecodedParams, GateFitsWith, HasComponentDefs, PageCursor } from "@seedcord/core/internal";
|
|
3
|
-
import { APIInteractionGuildMember, APIMessageComponentEmoji, AnySelectMenuInteraction, ApplicationCommand, ApplicationCommandOptionChoiceData, ApplicationCommandType, ApplicationEmoji, AutocompleteInteraction, BooleanCache, ButtonInteraction, ButtonStyle, CacheType, CacheTypeReducer, ChannelSelectMenuInteraction, ChatInputCommandInteraction, Client, ClientEvents, ClientOptions, Collection, CommandInteractionOption, ContextMenuCommandInteraction, Events, Guild, GuildEmoji, GuildMember, Interaction, MentionableSelectMenuInteraction, Message, MessageContextMenuCommandInteraction, ModalSubmitInteraction, Role, RoleSelectMenuInteraction, Snowflake, StringSelectMenuInteraction, TextChannel, TextChannelResolvable, User, UserContextMenuCommandInteraction, UserSelectMenuInteraction, WebhookClient } from "discord.js";
|
|
4
|
-
import {
|
|
3
|
+
import { APIInteractionGuildMember, APIMessageComponentEmoji, AnySelectMenuInteraction, ApplicationCommand, ApplicationCommandOptionChoiceData, ApplicationCommandType, ApplicationEmoji, AutocompleteInteraction, BooleanCache, ButtonInteraction, ButtonStyle, CacheType, CacheTypeReducer, ChannelSelectMenuInteraction, ChannelType, ChatInputCommandInteraction, Client, ClientEvents, ClientOptions, Collection, CommandInteractionOption, ContextMenuCommandInteraction, Events, Guild, GuildEmoji, GuildMember, Interaction, MentionableSelectMenuInteraction, Message, MessageContextMenuCommandInteraction, ModalSubmitInteraction, Role, RoleSelectMenuInteraction, Snowflake, StringSelectMenuInteraction, TextChannel, TextChannelResolvable, User, UserContextMenuCommandInteraction, UserSelectMenuInteraction, WebhookClient } from "discord.js";
|
|
4
|
+
import { Logger } from "@seedcord/logger";
|
|
5
5
|
import { ActionRowBuilder, ButtonBuilder, ContextMenuCommandBuilder, SlashCommandBuilder } from "@discordjs/builders";
|
|
6
|
-
import {
|
|
6
|
+
import { EventMap, NoEvents, TypedEventEmitter } from "@seedcord/event-emitter";
|
|
7
|
+
import { CoordinatedShutdown, CoordinatedStartup, StartupPhase } from "@seedcord/services";
|
|
8
|
+
import { SeedcordBrand, SeedcordInstance } from "@seedcord/types/internal";
|
|
7
9
|
import { UUID } from "node:crypto";
|
|
8
|
-
import { BotConfig, Config, EmojiMap, IRateLimiter, Nullable, ReplyResponse, Tail, V2Component } from "@seedcord/types";
|
|
10
|
+
import { BotConfig, Config, EmojiMap, HmrAware, HmrUpdateEvent, IRateLimiter, Nullable, ReplyResponse, Tail, V2Component } from "@seedcord/types";
|
|
9
11
|
export * from "@seedcord/core";
|
|
10
12
|
export * from "@seedcord/errors";
|
|
11
13
|
export * from "@seedcord/utils";
|
|
12
|
-
export * from "@seedcord/
|
|
14
|
+
export * from "@seedcord/logger";
|
|
15
|
+
export * from "@seedcord/event-emitter";
|
|
13
16
|
export * from "@seedcord/rate-limiter";
|
|
17
|
+
export * from "@seedcord/services";
|
|
14
18
|
export type * from "@seedcord/types";
|
|
15
19
|
|
|
16
20
|
//#region src/bot/utilities/miscellaneous/contextMenuLeaves.d.ts
|
|
@@ -55,7 +59,6 @@ interface GatewayConfig extends Config {
|
|
|
55
59
|
}
|
|
56
60
|
//#endregion
|
|
57
61
|
//#region src/interfaces/Plugin.d.ts
|
|
58
|
-
/** Interface for objects that can be initialized asynchronously */
|
|
59
62
|
interface Initializeable {
|
|
60
63
|
init(): Promise<void>;
|
|
61
64
|
}
|
|
@@ -65,16 +68,12 @@ interface Initializeable {
|
|
|
65
68
|
* Extend this class to create plugins that integrate with the Seedcord lifecycle.
|
|
66
69
|
* Plugins have access to the core instance and must implement initialization logic.
|
|
67
70
|
*/
|
|
68
|
-
declare abstract class Plugin<TPluginEvents extends
|
|
71
|
+
declare abstract class Plugin<TPluginEvents extends EventMap<TPluginEvents> = NoEvents> extends TypedEventEmitter<TPluginEvents> implements Initializeable, HmrAware {
|
|
69
72
|
protected pluggable: Core;
|
|
70
|
-
/** Logger instance for this plugin. */
|
|
71
73
|
abstract logger: Logger;
|
|
72
74
|
name: string;
|
|
73
75
|
constructor(pluggable: Core);
|
|
74
|
-
/**
|
|
75
|
-
* Initialize the plugin.
|
|
76
|
-
* @virtual
|
|
77
|
-
*/
|
|
76
|
+
/** @virtual */
|
|
78
77
|
abstract init(): Promise<void>;
|
|
79
78
|
/**
|
|
80
79
|
* Reloads plugin state on an HMR update. The base implementation is a no-op, override it in your plugin.
|
|
@@ -87,22 +86,18 @@ declare abstract class Plugin<TPluginEvents extends SEEventMapLike<TPluginEvents
|
|
|
87
86
|
*/
|
|
88
87
|
protected registerCriticalFiles(patterns: string[]): void;
|
|
89
88
|
/** @internal */
|
|
90
|
-
setMaxListeners(n: number): this;
|
|
91
|
-
/** @internal */
|
|
92
89
|
removeListener<TEventKey extends Extract<keyof TPluginEvents, string | symbol>>(event: TEventKey, listener: (...args: TPluginEvents[TEventKey]) => void): this;
|
|
93
90
|
/** @internal */
|
|
94
|
-
removeAllListeners(
|
|
91
|
+
removeAllListeners(event?: Extract<keyof TPluginEvents, string | symbol>): this;
|
|
95
92
|
}
|
|
96
93
|
/**
|
|
97
|
-
* Constructor type for plugins that can accept
|
|
98
|
-
* @typeParam TPlugin - The plugin type being constructed
|
|
94
|
+
* Constructor type for plugins that can accept extra arguments after Core.
|
|
99
95
|
*
|
|
100
96
|
* @internal
|
|
101
97
|
*/
|
|
102
98
|
type PluginCtor<TPlugin extends Plugin = Plugin> = new (core: Core, ...args: any[]) => TPlugin;
|
|
103
99
|
/**
|
|
104
|
-
* Extracts the argument types for a plugin constructor
|
|
105
|
-
* @typeParam Ctor - The plugin constructor to extract arguments from
|
|
100
|
+
* Extracts the argument types for a plugin constructor, excluding the Core parameter.
|
|
106
101
|
*
|
|
107
102
|
* @internal
|
|
108
103
|
*/
|
|
@@ -113,7 +108,7 @@ type PluginArgs<Ctor extends PluginCtor> = Tail<ConstructorParameters<Ctor>>;
|
|
|
113
108
|
* Provides plugin attachment capabilities and lifecycle management. Plugins are attached during
|
|
114
109
|
* configuration and initialized during startup. Not constructed directly, the host is a {@link Seedcord}.
|
|
115
110
|
*/
|
|
116
|
-
declare class Pluggable<TPluggableEvents extends
|
|
111
|
+
declare class Pluggable<TPluggableEvents extends EventMap<TPluggableEvents> = NoEvents> extends TypedEventEmitter<TPluggableEvents> {
|
|
117
112
|
protected isInitialized: boolean;
|
|
118
113
|
protected readonly shutdown: CoordinatedShutdown;
|
|
119
114
|
protected readonly startup: CoordinatedStartup;
|
|
@@ -145,11 +140,9 @@ declare class Pluggable<TPluggableEvents extends SEEventMapLike<TPluggableEvents
|
|
|
145
140
|
*/
|
|
146
141
|
attach<Key extends string, Ctor extends PluginCtor>(this: this, key: Key, Plugin: Ctor, startupPhase: StartupPhase, ...args: PluginArgs<Ctor>): this & Record<Key, InstanceType<Ctor>>;
|
|
147
142
|
/** @internal */
|
|
148
|
-
setMaxListeners(n: number): this;
|
|
149
|
-
/** @internal */
|
|
150
143
|
removeListener<TEventKey extends Extract<keyof TPluggableEvents, string | symbol>>(event: TEventKey, listener: (...args: TPluggableEvents[TEventKey]) => void): this;
|
|
151
144
|
/** @internal */
|
|
152
|
-
removeAllListeners(
|
|
145
|
+
removeAllListeners(event?: Extract<keyof TPluggableEvents, string | symbol>): this;
|
|
153
146
|
}
|
|
154
147
|
//#endregion
|
|
155
148
|
//#region src/subscribers/types/Subscriptions.d.ts
|
|
@@ -247,7 +240,7 @@ type SubscriptionKey = keyof AllSubscriptions;
|
|
|
247
240
|
*/
|
|
248
241
|
type SubscriptionData<KeyOfSubscribers extends SubscriptionKey> = AllSubscriptions[KeyOfSubscribers];
|
|
249
242
|
/**
|
|
250
|
-
* Event map for Bus, compatible with
|
|
243
|
+
* Event map for Bus, compatible with TypedEventEmitter.
|
|
251
244
|
*
|
|
252
245
|
* @internal
|
|
253
246
|
*/
|
|
@@ -345,12 +338,15 @@ declare class CommandRegistry implements Initializeable, HmrAware {
|
|
|
345
338
|
readonly globalCommands: (SlashCommandBuilder | ContextMenuCommandBuilder)[];
|
|
346
339
|
readonly guildCommands: Collection<string, (SlashCommandBuilder | ContextMenuCommandBuilder)[]>;
|
|
347
340
|
private readonly ctorToCommand;
|
|
341
|
+
private loading;
|
|
342
|
+
private readonly loadedCommands;
|
|
348
343
|
private readonly hmrHandler?;
|
|
349
344
|
private readonly pendingEvents;
|
|
350
345
|
constructor(core: Core, onDeployed?: ((result: DeployResult) => void) | undefined);
|
|
351
346
|
private getArtifacts;
|
|
352
347
|
/** @internal */
|
|
353
348
|
init(): Promise<void>;
|
|
349
|
+
private reportLoad;
|
|
354
350
|
/** @internal */
|
|
355
351
|
refresh(shouldRefresh?: boolean): Promise<void>;
|
|
356
352
|
/** @internal */
|
|
@@ -454,6 +450,11 @@ declare class Bot extends Plugin<BotEvents> {
|
|
|
454
450
|
emit<TKey extends keyof ClientEvents>(event: 'any:event', name: TKey, ...args: ClientEvents[TKey]): boolean;
|
|
455
451
|
/** @internal */
|
|
456
452
|
emit<TEventKey extends keyof BotEvents>(event: TEventKey, ...args: BotEvents[TEventKey]): boolean;
|
|
453
|
+
/** @internal */
|
|
454
|
+
emitSafe<TKey extends keyof ClientEvents>(event: 'any:event', name: TKey, ...args: ClientEvents[TKey]): boolean;
|
|
455
|
+
/** @internal */
|
|
456
|
+
emitSafe<TEventKey extends keyof BotEvents>(event: TEventKey, ...args: BotEvents[TEventKey]): boolean;
|
|
457
|
+
protected onListenerError(error: unknown, event: string | symbol): void;
|
|
457
458
|
}
|
|
458
459
|
//#endregion
|
|
459
460
|
//#region src/handlers/BaseHandler.d.ts
|
|
@@ -473,7 +474,8 @@ declare abstract class BaseHandler<ValidEvent extends ValidEventTypes> implement
|
|
|
473
474
|
readonly core: Core;
|
|
474
475
|
protected readonly event: ValidEvent;
|
|
475
476
|
protected readonly logger: Logger;
|
|
476
|
-
protected
|
|
477
|
+
protected readonly dispatch?: DispatchContext | undefined;
|
|
478
|
+
protected constructor(event: ValidEvent, core: Core, dispatch?: DispatchContext);
|
|
477
479
|
/**
|
|
478
480
|
* Holds the main logic of your handler. The dispatcher calls it after the handler's gates pass, so a
|
|
479
481
|
* gate that refuses stops `execute()` from running.
|
|
@@ -895,7 +897,7 @@ type GateContext = InteractionGateContext | EventGateContext;
|
|
|
895
897
|
* @typeParam Repliable - The interaction type this handler processes
|
|
896
898
|
*/
|
|
897
899
|
declare abstract class InteractionHandler<Repliable extends Repliables> extends BaseHandler<Repliable> implements Handler {
|
|
898
|
-
constructor(event: Repliable, core: Core);
|
|
900
|
+
constructor(event: Repliable, core: Core, dispatch?: DispatchContext);
|
|
899
901
|
}
|
|
900
902
|
//#endregion
|
|
901
903
|
//#region src/bot/gates/matching.d.ts
|
|
@@ -1013,7 +1015,7 @@ type FocusedArms<Route extends keyof SlashOptionRegistry, Ret> = { [Name in Auto
|
|
|
1013
1015
|
* ```
|
|
1014
1016
|
*/
|
|
1015
1017
|
declare abstract class AutocompleteHandler<Route extends keyof SlashOptionRegistry, Cache extends CacheType = 'cached'> extends BaseHandler<AutocompleteInteraction<Cache>> implements Handler {
|
|
1016
|
-
constructor(event: AutocompleteInteraction<Cache>, core: Core);
|
|
1018
|
+
constructor(event: AutocompleteInteraction<Cache>, core: Core, dispatch?: DispatchContext);
|
|
1017
1019
|
/**
|
|
1018
1020
|
* The focused option for this interaction. `value` is always the raw partial string the user is typing,
|
|
1019
1021
|
* even for an integer or number option, so coerce it yourself when you need a number.
|
|
@@ -1096,6 +1098,12 @@ type Row<Route extends keyof SlashOptionRegistry> = SlashOptionRegistry[Route];
|
|
|
1096
1098
|
type NamesOfKind<Route extends keyof SlashOptionRegistry, Kind extends OptionKind> = { [Name in keyof Row<Route>]: Row<Route>[Name] extends {
|
|
1097
1099
|
kind: Kind;
|
|
1098
1100
|
} ? Name : never }[keyof Row<Route>];
|
|
1101
|
+
type ChannelWireType<Types extends number> = Types extends ChannelType.PublicThread | ChannelType.AnnouncementThread ? ChannelType.PublicThread | ChannelType.AnnouncementThread : Types;
|
|
1102
|
+
type ResolvedChannel<Cache extends CacheType, Entry> = Entry extends {
|
|
1103
|
+
channelTypes: readonly (infer Types extends number)[];
|
|
1104
|
+
} ? Extract<NonNullable<CommandInteractionOption<Cache>['channel']>, {
|
|
1105
|
+
type: ChannelWireType<Types>;
|
|
1106
|
+
}> : NonNullable<CommandInteractionOption<Cache>['channel']>;
|
|
1099
1107
|
type ResolvedValue<Cache extends CacheType, Entry> = Entry extends {
|
|
1100
1108
|
choices: readonly (infer Choice)[];
|
|
1101
1109
|
} ? Choice : Entry extends {
|
|
@@ -1108,7 +1116,7 @@ type ResolvedValue<Cache extends CacheType, Entry> = Entry extends {
|
|
|
1108
1116
|
kind: 'user';
|
|
1109
1117
|
} ? NonNullable<CommandInteractionOption<Cache>['user']> : Entry extends {
|
|
1110
1118
|
kind: 'channel';
|
|
1111
|
-
} ?
|
|
1119
|
+
} ? ResolvedChannel<Cache, Entry> : Entry extends {
|
|
1112
1120
|
kind: 'role';
|
|
1113
1121
|
} ? NonNullable<CommandInteractionOption<Cache>['role']> : Entry extends {
|
|
1114
1122
|
kind: 'mentionable';
|
|
@@ -1128,8 +1136,8 @@ type MemberGetter<Route extends keyof SlashOptionRegistry, Cache extends CacheTy
|
|
|
1128
1136
|
* on required options, narrows `choices` to their literal union, and only appears when the route has an
|
|
1129
1137
|
* option of that kind. The rich kinds return exactly what the djs resolver returns.
|
|
1130
1138
|
*
|
|
1131
|
-
*
|
|
1132
|
-
*
|
|
1139
|
+
* A channel option declared with `addChannelTypes` narrows `getChannel` to the matching channel subtype.
|
|
1140
|
+
* Pass the raw `this.event.options` resolver for anything this view does not cover.
|
|
1133
1141
|
*
|
|
1134
1142
|
* @typeParam Route - A route key from the generated {@link SlashOptionRegistry}.
|
|
1135
1143
|
* @typeParam Cache - The interaction cache state, `'cached'` by default.
|
|
@@ -2405,72 +2413,6 @@ declare abstract class WebhookLog<KeyOfSubscribers extends SubscriptionKey> exte
|
|
|
2405
2413
|
constructor(data: AllSubscriptions[KeyOfSubscribers], core: Core);
|
|
2406
2414
|
}
|
|
2407
2415
|
//#endregion
|
|
2408
|
-
//#region src/hmr/HmrModuleHandler.d.ts
|
|
2409
|
-
/**
|
|
2410
|
-
* Options for configuring the HmrModuleHandler.
|
|
2411
|
-
*
|
|
2412
|
-
* This is only useful during development.
|
|
2413
|
-
*/
|
|
2414
|
-
interface HmrModuleHandlerOptions<THandler, TMiddleware = void, TArtifacts = unknown> {
|
|
2415
|
-
/** Directory containing handler modules. */
|
|
2416
|
-
handlersDir: string;
|
|
2417
|
-
/** Directory containing middleware modules. Optional because not all setups use middleware. */
|
|
2418
|
-
middlewaresDir?: string;
|
|
2419
|
-
/** Function to determine if a value is a handler module of type THandler. */
|
|
2420
|
-
isHandler: (val: unknown) => val is THandler;
|
|
2421
|
-
/** Function to determine if a value is a middleware module of type TMiddleware. Optional because not all setups use middleware. */
|
|
2422
|
-
isMiddleware?: (val: unknown) => val is TMiddleware;
|
|
2423
|
-
/** Function to register a handler module. */
|
|
2424
|
-
registerHandler: (handler: THandler, file: string) => void;
|
|
2425
|
-
/** Function to register a middleware module. Optional because not all setups use middleware. */
|
|
2426
|
-
registerMiddleware?: (middleware: TMiddleware, file: string) => void;
|
|
2427
|
-
/** Function to unregister a handler module. */
|
|
2428
|
-
unregisterHandler: (handler: THandler, artifacts?: TArtifacts) => void;
|
|
2429
|
-
/** Function to unregister a middleware module. Optional because not all setups use middleware. */
|
|
2430
|
-
unregisterMiddleware?: (middleware: TMiddleware) => void;
|
|
2431
|
-
/** Function to extract artifacts from a handler to be stored across hmr cache invalidations. */
|
|
2432
|
-
getArtifacts?: (handler: THandler) => TArtifacts;
|
|
2433
|
-
/** Logger instance for logging HMR activities.*/
|
|
2434
|
-
logger: Logger;
|
|
2435
|
-
}
|
|
2436
|
-
/**
|
|
2437
|
-
* Reloads THandler and optional TMiddleware modules on HMR updates.
|
|
2438
|
-
*
|
|
2439
|
-
* You can either implement a custom `onHmr()` method in your class by extending `HmrAware`, or if it's a plugin, override the existing `onHmr()` with fully custom logic. Or, use this class's `handle()` method inside your `onHmr()` to get standard HMR handling for your modules based on the provided options you give to the constructor.
|
|
2440
|
-
*
|
|
2441
|
-
* This is only useful during development.
|
|
2442
|
-
*/
|
|
2443
|
-
declare class HmrModuleHandler<THandler, TMiddleware = void, TArtifacts = unknown> {
|
|
2444
|
-
private readonly store;
|
|
2445
|
-
private readonly options;
|
|
2446
|
-
constructor(options: HmrModuleHandlerOptions<THandler, TMiddleware, TArtifacts>);
|
|
2447
|
-
/**
|
|
2448
|
-
* Handles an HMR update event by reloading affected modules based on the event details and config. It receives an {@link HmrUpdateEvent}, then checks the type of update.
|
|
2449
|
-
*
|
|
2450
|
-
* - If it's a deletion, it unloads the module.
|
|
2451
|
-
* - If it's an update/creation, it checks if the file is tracked, unloads it if so, then reloads the file if it is in the handlers or middlewares directory and is a valid handler/middleware.
|
|
2452
|
-
*/
|
|
2453
|
-
handle(event: HmrUpdateEvent): Promise<void>;
|
|
2454
|
-
private reloadWithRollback;
|
|
2455
|
-
/**
|
|
2456
|
-
* Tracks a handler module as being loaded from a specific file.
|
|
2457
|
-
* @param file - The file path the handler was loaded from.
|
|
2458
|
-
* @param handler - The handler module instance.
|
|
2459
|
-
*/
|
|
2460
|
-
trackHandler(file: string, handler: THandler): void;
|
|
2461
|
-
/**
|
|
2462
|
-
* Tracks a middleware module as being loaded from a specific file.
|
|
2463
|
-
* @param file - The file path the middleware was loaded from.
|
|
2464
|
-
* @param middleware - The middleware module instance.
|
|
2465
|
-
*/
|
|
2466
|
-
trackMiddleware(file: string, middleware: TMiddleware): void;
|
|
2467
|
-
private isTracked;
|
|
2468
|
-
private unload;
|
|
2469
|
-
private reloadFile;
|
|
2470
|
-
private snapshotUnits;
|
|
2471
|
-
private restoreUnits;
|
|
2472
|
-
}
|
|
2473
|
-
//#endregion
|
|
2474
2416
|
//#region src/Seedcord.d.ts
|
|
2475
2417
|
/**
|
|
2476
2418
|
* Main Seedcord bot framework class
|
|
@@ -2487,6 +2429,8 @@ declare class Seedcord extends Pluggable implements Core {
|
|
|
2487
2429
|
/** @internal */
|
|
2488
2430
|
readonly version: string;
|
|
2489
2431
|
private static isInstantiated;
|
|
2432
|
+
private readonly healthCheck;
|
|
2433
|
+
private readonly hmrManager;
|
|
2490
2434
|
/** @see {@link CoordinatedShutdown} */
|
|
2491
2435
|
readonly shutdown: CoordinatedShutdown;
|
|
2492
2436
|
/** @see {@link CoordinatedStartup} */
|
|
@@ -2497,10 +2441,6 @@ declare class Seedcord extends Pluggable implements Core {
|
|
|
2497
2441
|
readonly bot: Bot;
|
|
2498
2442
|
/** @see {@link IRateLimiter} */
|
|
2499
2443
|
readonly rateLimiter: IRateLimiter;
|
|
2500
|
-
/** @see {@link HealthCheck} */
|
|
2501
|
-
private readonly healthCheck;
|
|
2502
|
-
/** @see {@link HmrManager} */
|
|
2503
|
-
private readonly hmrManager;
|
|
2504
2444
|
/**
|
|
2505
2445
|
* Creates a new Seedcord instance
|
|
2506
2446
|
*
|
|
@@ -2508,12 +2448,9 @@ declare class Seedcord extends Pluggable implements Core {
|
|
|
2508
2448
|
* @throws A **SeedcordError** When attempting to create multiple instances (singleton)
|
|
2509
2449
|
*/
|
|
2510
2450
|
constructor(config: GatewayConfig);
|
|
2511
|
-
/**
|
|
2451
|
+
/** The bot's discord username, populated after login. */
|
|
2452
|
+
get username(): string | undefined;
|
|
2512
2453
|
private static reset;
|
|
2513
|
-
/**
|
|
2514
|
-
* Registers default startup tasks
|
|
2515
|
-
* @internal
|
|
2516
|
-
*/
|
|
2517
2454
|
private registerStartupTasks;
|
|
2518
2455
|
/**
|
|
2519
2456
|
* Starts the bot and runs all initialization tasks
|
|
@@ -2528,5 +2465,5 @@ declare class Seedcord extends Pluggable implements Core {
|
|
|
2528
2465
|
/** Package version */
|
|
2529
2466
|
declare const version: string;
|
|
2530
2467
|
//#endregion
|
|
2531
|
-
export { type AllSubscriptions, ArraySource, AssignRoleErrorCtors, AutocompleteHandler, type AutocompleteOptions, AutocompleteRoute, type BotEvents, type BotPermissionScope, ButtonHandler, ButtonRoute, type CheckPermissionOptions, CommandMentions, type ConfirmOptions, ContextMenuHandler, ContextMenuRoute, type Core, CursorSource, type DefaultConfirmOptions, Emojis, type EventGateContext, EventHandler, EventMiddleware, type EventSpec, type EventsConfig, type FaultSource, FetchUserOptions, type GateContext, Gated, type GatewayBotConfig, type GatewayConfig, HasPermsToAssignOptions,
|
|
2468
|
+
export { type AllSubscriptions, ArraySource, AssignRoleErrorCtors, AutocompleteHandler, type AutocompleteOptions, AutocompleteRoute, type BotEvents, type BotPermissionScope, ButtonHandler, ButtonRoute, type CheckPermissionOptions, CommandMentions, type ConfirmOptions, ContextMenuHandler, ContextMenuRoute, type Core, CursorSource, type DefaultConfirmOptions, Emojis, type EventGateContext, EventHandler, EventMiddleware, type EventSpec, type EventsConfig, type FaultSource, FetchUserOptions, type GateContext, Gated, type GatewayBotConfig, type GatewayConfig, HasPermsToAssignOptions, IgnoreBots, type Initializeable, type InjectedEmojiMap, type InjectedMentionMap, type InteractionGateContext, InteractionHandler, InteractionMiddleware, Middleware, type MiddlewareOptions, MiddlewareType, ModalHandler, ModalRoute, Nsfw, Paginator, type PaginatorControls, type PermissionErrorCtors, Pluggable, Plugin, type PluginArgs, type PluginCtor, RegisterCommand, RegisterEvent, type RegisterEventOptions, type Repliables, ReplySender, RequireBotPermissions, RequirePermissions, type RequirePermissionsOptions, RequireRole, type RequireRoleOptions, Seedcord, SelectMenuHandler, SelectMenuKind, SelectMenuRoute, SlashHandler, type SlashOptions, SlashRoute, Subscribe, type SubscribeOptions, Subscriber, type SubscriptionData, type SubscriptionKey, type Subscriptions, type ValidEventTypes, type ValidInteractionTypes, type ValidNonInteractionKeys, WebhookLog, checkBotPermissions, checkPermissions, fetchGuildMember, fetchManyGuildMembers, fetchManyUsers, fetchRole, fetchText, fetchUser, getBotRole, getConfirmation, hasPermsToAssign, updateMemberRoles, version };
|
|
2532
2469
|
//# sourceMappingURL=index.d.mts.map
|