@seedcord/http 0.5.1 → 0.7.0

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.
@@ -1,11 +1,12 @@
1
- import { t as RouteManifest } from "./RouteManifest-DTxI4fS0.mjs";
1
+ import { t as RouteManifest } from "./RouteManifest-D7qXj8Ts.mjs";
2
2
  import "reflect-metadata";
3
- import { AutocompletableNames, AutocompleteRouteBrand, ChoiceValueOf, ComponentDefsBrand, ComponentKindBrand, ContextMenuKindBrand, ContextMenuNamesBrand, EntryFor, FocusedField, GateFitsWith, HasComponentDefs, InteractionRoutes, MatchArms, NamesFor, PageCursor, SingleParams, SlashOptions, SlashRouteBrand } from "@seedcord/core/internal";
3
+ import { AutocompletableNames, AutocompleteRouteBrand, ChoiceValueOf, ComponentDefsBrand, ComponentKindBrand, ContextMenuKindBrand, ContextMenuNamesBrand, EntryFor, FocusedField, GateFitsWith, HasComponentDefs, MatchArms, NamesFor, PageCursor, SingleParams, SlashOptions, SlashRouteBrand } from "@seedcord/core/internal";
4
4
  import { REST } from "@discordjs/rest";
5
- import { ArraySourceBase, AutocompleteOptions, BaseHandler, BaseReplySender, Bus, CoreBase, CursorSourceBase, DispatchContext, Gate, GateContextBase, GuildPermissionsContext, ModalLike, PageSourceBase, PaginatorBase, PaginatorConfig, RepliableHandler, RequiredOf, ResolvedEmoji, SelectMenuKind, SlashRegistry, Subscriber, SubscriptionKey, WebhookLog } from "@seedcord/core";
5
+ import { ArraySourceBase, AutocompleteOptions, BaseHandler, BaseReplySender, Bus, CoreBase, CursorSourceBase, DispatchContext, Gate, GateContextBase, GuildPermissionsContext, InteractionKind, ModalLike, PageSourceBase, PaginatorBase, PaginatorConfig, RepliableHandler, RequiredOf, ResolvedEmoji, SlashRegistry, Subscriber, SubscriptionKey, WebhookLog } from "@seedcord/core";
6
6
  import { APIApplicationCommandAutocompleteInteraction, APIApplicationCommandOptionChoice, APIAttachment, APIChatInputApplicationCommandInteraction, APIContextMenuInteraction, APIInteraction, APIInteractionDataResolvedChannel, APIInteractionDataResolvedChannelBase, APIInteractionDataResolvedGuildMember, APIInteractionGuildMember, APIMessage, APIMessageApplicationCommandInteraction, APIMessageChannelSelectInteractionData, APIMessageComponentButtonInteraction, APIMessageComponentInteraction, APIMessageComponentSelectMenuInteraction, APIMessageMentionableSelectInteractionData, APIMessageRoleSelectInteractionData, APIMessageStringSelectInteractionData, APIMessageUserSelectInteractionData, APIModalInteractionResponseCallbackData, APIModalSubmission, APIModalSubmitInteraction, APIRole, APIThreadChannel, APIUser, APIUserApplicationCommandInteraction, ApplicationCommandType, ChannelType, ModalSubmitComponent, ThreadChannelType } from "discord-api-types/v10";
7
7
  import { API } from "@discordjs/core/http-only";
8
8
  import { AnyCustomId } from "@seedcord/custom-id";
9
+ import { Collection } from "@discordjs/collection";
9
10
  import { CoordinatedShutdown, CoordinatedStartup } from "@seedcord/core/node";
10
11
  import { Config, DeferOpts, EmojiMap, ReplyResponse, SendOpts } from "@seedcord/types";
11
12
  import { NonEmptyTuple, Promisable } from "type-fest";
@@ -39,6 +40,7 @@ interface HttpServerConfig extends Config {
39
40
  interface HttpEdgeConfig extends Config {
40
41
  runtime: 'edge';
41
42
  port?: never;
43
+ lifecycle?: never;
42
44
  }
43
45
  /**
44
46
  * The http transport's configuration, discriminated on `runtime`.
@@ -120,9 +122,9 @@ type SlashOptions$1<Route extends keyof SlashRegistry> = SlashOptions<Route, Htt
120
122
  type FieldKind = ModalSubmitComponent['type'];
121
123
  /** The users, members, and roles a mentionable select picked. */
122
124
  interface SelectedMentionables {
123
- users: Map<string, APIUser>;
124
- members: Map<string, APIInteractionDataResolvedGuildMember>;
125
- roles: Map<string, APIRole>;
125
+ users: Collection<string, APIUser>;
126
+ members: Collection<string, APIInteractionDataResolvedGuildMember>;
127
+ roles: Collection<string, APIRole>;
126
128
  }
127
129
  /**
128
130
  * The fields a modal carries, read by custom id.
@@ -131,7 +133,7 @@ interface SelectedMentionables {
131
133
  * kind that getter does not read. The message names the getter that does.
132
134
  *
133
135
  * A select getter resolves the ids its field picked against the interaction's `resolved` data and returns a
134
- * `Map` keyed by id. A field that picked nothing returns null. Pass `required` to throw there instead.
136
+ * `Collection` keyed by id. A field that picked nothing returns null. Pass `required` to throw there instead.
135
137
  */
136
138
  declare class ModalFields {
137
139
  private readonly entries;
@@ -152,19 +154,19 @@ declare class ModalFields {
152
154
  getField(customId: string): ModalSubmitComponent;
153
155
  getTextInputValue(customId: string): string;
154
156
  getStringSelectValues(customId: string): string[];
155
- getSelectedUsers(customId: string, required: true): Map<string, APIUser>;
156
- getSelectedUsers(customId: string, required?: boolean): Map<string, APIUser> | null;
157
+ getSelectedUsers(customId: string, required: true): Collection<string, APIUser>;
158
+ getSelectedUsers(customId: string, required?: boolean): Collection<string, APIUser> | null;
157
159
  /** The guild members behind the picked users. Discord resolves these only inside a guild. */
158
- getSelectedMembers(customId: string): Map<string, APIInteractionDataResolvedGuildMember> | null;
159
- getSelectedRoles(customId: string, required: true): Map<string, APIRole>;
160
- getSelectedRoles(customId: string, required?: boolean): Map<string, APIRole> | null;
160
+ getSelectedMembers(customId: string): Collection<string, APIInteractionDataResolvedGuildMember> | null;
161
+ getSelectedRoles(customId: string, required: true): Collection<string, APIRole>;
162
+ getSelectedRoles(customId: string, required?: boolean): Collection<string, APIRole> | null;
161
163
  /** Pass `channelTypes` to throw when a pick falls outside those types. */
162
- getSelectedChannels(customId: string, required: true, channelTypes?: readonly ChannelType[]): Map<string, APIInteractionDataResolvedChannel>;
163
- getSelectedChannels(customId: string, required?: boolean, channelTypes?: readonly ChannelType[]): Map<string, APIInteractionDataResolvedChannel> | null;
164
+ getSelectedChannels(customId: string, required: true, channelTypes?: readonly ChannelType[]): Collection<string, APIInteractionDataResolvedChannel>;
165
+ getSelectedChannels(customId: string, required?: boolean, channelTypes?: readonly ChannelType[]): Collection<string, APIInteractionDataResolvedChannel> | null;
164
166
  getSelectedMentionables(customId: string, required: true): SelectedMentionables;
165
167
  getSelectedMentionables(customId: string, required?: boolean): SelectedMentionables | null;
166
- getUploadedFiles(customId: string, required: true): Map<string, APIAttachment>;
167
- getUploadedFiles(customId: string, required?: boolean): Map<string, APIAttachment> | null;
168
+ getUploadedFiles(customId: string, required: true): Collection<string, APIAttachment>;
169
+ getUploadedFiles(customId: string, required?: boolean): Collection<string, APIAttachment> | null;
168
170
  getRadioGroup(customId: string, required: true): string;
169
171
  getRadioGroup(customId: string, required?: boolean): string | null;
170
172
  getCheckboxGroup(customId: string): string[];
@@ -222,8 +224,8 @@ type Repliables = Exclude<ValidInteractionTypes, APIApplicationCommandAutocomple
222
224
  * Shared base the repliable HTTP interaction handlers extend.
223
225
  *
224
226
  * Not a public entry point. Extend {@link SlashHandler}, {@link ButtonHandler}, {@link ModalHandler},
225
- * {@link SelectMenuHandler}, or {@link ContextMenuHandler} instead. This class binds the core reply base
226
- * to the http sender.
227
+ * {@link ContextMenuHandler}, or one of the select menu bases instead. This class binds the core
228
+ * reply base to the http sender.
227
229
  *
228
230
  * @typeParam Event - The repliable interaction type this handler processes
229
231
  */
@@ -244,8 +246,8 @@ declare abstract class RepliableHandler$1<Event extends Repliables> extends Repl
244
246
  * Shared base the repliable interaction handlers extend.
245
247
  *
246
248
  * Not a public entry point. Extend {@link SlashHandler}, {@link ContextMenuHandler}, {@link ButtonHandler},
247
- * {@link SelectMenuHandler}, or {@link ModalHandler} instead. This class adds `showModal` on top of the
248
- * reply members.
249
+ * {@link ModalHandler}, or one of the select menu bases instead. This class adds `showModal` on top
250
+ * of the reply members.
249
251
  *
250
252
  * @typeParam Event - The repliable interaction type this handler processes
251
253
  */
@@ -443,9 +445,9 @@ declare abstract class AutocompleteHandler<Route extends keyof SlashRegistry> ex
443
445
  /**
444
446
  * Shared base the customId-routed component handlers extend on the HTTP transport.
445
447
  *
446
- * Not a public entry point. Extend {@link ButtonHandler}, {@link SelectMenuHandler}, or {@link ModalHandler}
447
- * instead. This class defines the customId decode, the route matching, and the source-message verbs
448
- * `update` and `deferUpdate`.
448
+ * Not a public entry point. Extend {@link ButtonHandler}, {@link ModalHandler}, or one of the select menu
449
+ * bases instead. This class defines the customId decode, the route matching, and the source-message
450
+ * verbs `update` and `deferUpdate`.
449
451
  *
450
452
  * @typeParam Event - The component or modal interaction type this handler processes
451
453
  * @typeParam Defs - The customId route definitions registered on the concrete handler
@@ -510,7 +512,7 @@ declare abstract class ComponentHandler<Event extends APIMessageComponentInterac
510
512
  */
511
513
  declare abstract class ButtonHandler<Defs extends readonly AnyCustomId[]> extends ComponentHandler<APIMessageComponentButtonInteraction, Defs> {
512
514
  /** @internal */
513
- readonly [ComponentKindBrand]?: 'button';
515
+ readonly [ComponentKindBrand]?: InteractionKind.Button;
514
516
  }
515
517
  //#endregion
516
518
  //#region src/handlers/interaction/components/ModalHandler.d.ts
@@ -537,7 +539,7 @@ declare abstract class ButtonHandler<Defs extends readonly AnyCustomId[]> extend
537
539
  */
538
540
  declare abstract class ModalHandler<Defs extends readonly AnyCustomId[]> extends ComponentHandler<APIModalSubmitInteraction, Defs> {
539
541
  /** @internal */
540
- readonly [ComponentKindBrand]?: 'modal';
542
+ readonly [ComponentKindBrand]?: InteractionKind.Modal;
541
543
  private reader?;
542
544
  /** The fields this modal submitted, read by custom id. */
543
545
  protected get fields(): ModalFields;
@@ -549,29 +551,59 @@ declare abstract class ModalHandler<Defs extends readonly AnyCustomId[]> extends
549
551
  }
550
552
  //#endregion
551
553
  //#region src/handlers/interaction/components/SelectMenuHandler.d.ts
552
- type UserKinds = SelectMenuKind.User | SelectMenuKind.Mentionable;
553
- type RoleKinds = SelectMenuKind.Role | SelectMenuKind.Mentionable;
554
- type ResolvedFor<Kind extends SelectMenuKind, Allowed extends SelectMenuKind, Value> = [Kind] extends [Allowed] ? Map<string, Value> : never;
555
- type SelectMenuInteractionFor<Kind extends SelectMenuKind> = APIMessageComponentSelectMenuInteraction & {
556
- data: Kind extends SelectMenuKind.String ? APIMessageStringSelectInteractionData : Kind extends SelectMenuKind.User ? APIMessageUserSelectInteractionData : Kind extends SelectMenuKind.Role ? APIMessageRoleSelectInteractionData : Kind extends SelectMenuKind.Channel ? APIMessageChannelSelectInteractionData : Kind extends SelectMenuKind.Mentionable ? APIMessageMentionableSelectInteractionData : never;
554
+ type SelectInteraction<Data> = APIMessageComponentSelectMenuInteraction & {
555
+ data: Data;
557
556
  };
558
557
  /**
559
- * Base class for a select menu handler on the HTTP transport.
558
+ * Shared base the select menu handlers extend on the HTTP transport.
560
559
  *
561
- * Pass the select kind first and the customId definitions second, the same order as `@SelectMenuRoute`.
562
- * Read the picked ids from `this.values`. The kind decides which of `this.users`, `this.members`,
563
- * `this.roles`, and `this.channels` this handler carries. The rest are `never`.
560
+ * Not a public entry point. Extend {@link StringMenuHandler}, {@link UserMenuHandler},
561
+ * {@link RoleMenuHandler}, {@link ChannelMenuHandler}, or {@link MentionableMenuHandler} instead. This
562
+ * class defines the `values` getter those bases share.
564
563
  *
565
- * Read `this.params` for a single route or `this.match` for several. Reply through the handler members, or
566
- * rewrite the source message with `this.update`.
564
+ * @typeParam Event - The select menu interaction type this handler processes
565
+ * @typeParam Defs - The customId route definitions registered on the concrete handler
566
+ */
567
+ declare abstract class SelectMenuHandler<Event extends APIMessageComponentSelectMenuInteraction, Defs extends readonly AnyCustomId[]> extends ComponentHandler<Event, Defs> {
568
+ /** The values this select picked. On every kind but the string menu they are snowflake ids. */
569
+ protected get values(): string[];
570
+ }
571
+ /**
572
+ * Base class for a string select menu handler on the HTTP transport.
573
+ *
574
+ * Register the customId definitions with `@StringMenuRoute`, list the same ones in the generic, then read
575
+ * the chosen option values from `this.values`. Read `this.params` for a single route or `this.match` for
576
+ * several. Reply through the handler members, or rewrite the source message with `this.update`.
577
+ *
578
+ * @typeParam Defs - The customId definitions this handler decodes, e.g. `[typeof TopicsId]`.
579
+ *
580
+ * @example
581
+ * ```ts
582
+ * \@StringMenuRoute(TopicsId)
583
+ * class Topics extends StringMenuHandler<[typeof TopicsId]> {
584
+ * async execute() {
585
+ * const { userId } = this.params;
586
+ * await this.update(`<@${userId}> now follows ${this.values.join(', ')}`);
587
+ * }
588
+ * }
589
+ * ```
590
+ */
591
+ declare abstract class StringMenuHandler<Defs extends readonly AnyCustomId[]> extends SelectMenuHandler<SelectInteraction<APIMessageStringSelectInteractionData>, Defs> {
592
+ /** @internal */
593
+ readonly [ComponentKindBrand]?: InteractionKind.StringMenu;
594
+ }
595
+ /**
596
+ * Base class for a user select menu handler on the HTTP transport.
597
+ *
598
+ * Beside `this.values` this handler declares `this.users` and `this.members`. Register the customId
599
+ * definitions with `@UserMenuRoute` and list the same ones in the generic.
567
600
  *
568
- * @typeParam Kind - The select kind from {@link SelectMenuKind}, e.g. `SelectMenuKind.User`.
569
601
  * @typeParam Defs - The customId definitions this handler decodes, e.g. `[typeof AssignId]`.
570
602
  *
571
603
  * @example
572
604
  * ```ts
573
- * \@SelectMenuRoute(SelectMenuKind.User, AssignId)
574
- * class AssignSelect extends SelectMenuHandler<SelectMenuKind.User, [typeof AssignId]> {
605
+ * \@UserMenuRoute(AssignId)
606
+ * class Assign extends UserMenuHandler<[typeof AssignId]> {
575
607
  * async execute() {
576
608
  * const { roleId } = this.params;
577
609
  * await this.reply(`assigning ${this.users.size} member(s) to <@&${roleId}>`);
@@ -579,21 +611,89 @@ type SelectMenuInteractionFor<Kind extends SelectMenuKind> = APIMessageComponent
579
611
  * }
580
612
  * ```
581
613
  */
582
- declare abstract class SelectMenuHandler<Kind extends SelectMenuKind, Defs extends readonly AnyCustomId[]> extends ComponentHandler<SelectMenuInteractionFor<Kind>, Defs> {
614
+ declare abstract class UserMenuHandler<Defs extends readonly AnyCustomId[]> extends SelectMenuHandler<SelectInteraction<APIMessageUserSelectInteractionData>, Defs> {
583
615
  /** @internal */
584
- readonly [ComponentKindBrand]?: Kind;
585
- private get selection();
586
- private resolvedMap;
587
- /** The ids this select picked. */
588
- protected get values(): string[];
616
+ readonly [ComponentKindBrand]?: InteractionKind.UserMenu;
589
617
  /** The users this select picked. */
590
- protected get users(): ResolvedFor<Kind, UserKinds, APIUser>;
618
+ protected get users(): Collection<string, APIUser>;
591
619
  /** The guild members behind the picked users. Discord resolves these only inside a guild. */
592
- protected get members(): ResolvedFor<Kind, UserKinds, APIInteractionDataResolvedGuildMember>;
620
+ protected get members(): Collection<string, APIInteractionDataResolvedGuildMember>;
621
+ }
622
+ /**
623
+ * Base class for a role select menu handler on the HTTP transport.
624
+ *
625
+ * Beside `this.values` this handler declares `this.roles`. Register the customId definitions with
626
+ * `@RoleMenuRoute` and list the same ones in the generic.
627
+ *
628
+ * @typeParam Defs - The customId definitions this handler decodes, e.g. `[typeof GrantId]`.
629
+ *
630
+ * @example
631
+ * ```ts
632
+ * \@RoleMenuRoute(GrantId)
633
+ * class Grant extends RoleMenuHandler<[typeof GrantId]> {
634
+ * async execute() {
635
+ * await this.update(`granting ${this.roles.size} role(s)`);
636
+ * }
637
+ * }
638
+ * ```
639
+ */
640
+ declare abstract class RoleMenuHandler<Defs extends readonly AnyCustomId[]> extends SelectMenuHandler<SelectInteraction<APIMessageRoleSelectInteractionData>, Defs> {
641
+ /** @internal */
642
+ readonly [ComponentKindBrand]?: InteractionKind.RoleMenu;
593
643
  /** The roles this select picked. */
594
- protected get roles(): ResolvedFor<Kind, RoleKinds, APIRole>;
644
+ protected get roles(): Collection<string, APIRole>;
645
+ }
646
+ /**
647
+ * Base class for a channel select menu handler on the HTTP transport.
648
+ *
649
+ * Beside `this.values` this handler declares `this.channels`. Register the customId definitions with
650
+ * `@ChannelMenuRoute` and list the same ones in the generic.
651
+ *
652
+ * @typeParam Defs - The customId definitions this handler decodes, e.g. `[typeof LogTargetId]`.
653
+ *
654
+ * @example
655
+ * ```ts
656
+ * \@ChannelMenuRoute(LogTargetId)
657
+ * class LogTarget extends ChannelMenuHandler<[typeof LogTargetId]> {
658
+ * async execute() {
659
+ * await this.update(`logging to ${this.channels.size} channel(s)`);
660
+ * }
661
+ * }
662
+ * ```
663
+ */
664
+ declare abstract class ChannelMenuHandler<Defs extends readonly AnyCustomId[]> extends SelectMenuHandler<SelectInteraction<APIMessageChannelSelectInteractionData>, Defs> {
665
+ /** @internal */
666
+ readonly [ComponentKindBrand]?: InteractionKind.ChannelMenu;
595
667
  /** The channels this select picked. */
596
- protected get channels(): ResolvedFor<Kind, SelectMenuKind.Channel, APIInteractionDataResolvedChannel>;
668
+ protected get channels(): Collection<string, APIInteractionDataResolvedChannel>;
669
+ }
670
+ /**
671
+ * Base class for a mentionable select menu handler on the HTTP transport.
672
+ *
673
+ * A mentionable menu accepts users and roles together. `this.users`, `this.members`, and `this.roles`
674
+ * can each come back empty.
675
+ *
676
+ * @typeParam Defs - The customId definitions this handler decodes, e.g. `[typeof InviteId]`.
677
+ *
678
+ * @example
679
+ * ```ts
680
+ * \@MentionableMenuRoute(InviteId)
681
+ * class Invite extends MentionableMenuHandler<[typeof InviteId]> {
682
+ * async execute() {
683
+ * await this.update(`inviting ${this.users.size} user(s) and ${this.roles.size} role(s)`);
684
+ * }
685
+ * }
686
+ * ```
687
+ */
688
+ declare abstract class MentionableMenuHandler<Defs extends readonly AnyCustomId[]> extends SelectMenuHandler<SelectInteraction<APIMessageMentionableSelectInteractionData>, Defs> {
689
+ /** @internal */
690
+ readonly [ComponentKindBrand]?: InteractionKind.MentionableMenu;
691
+ /** The users this select picked. */
692
+ protected get users(): Collection<string, APIUser>;
693
+ /** The guild members behind the picked users. Discord resolves these only inside a guild. */
694
+ protected get members(): Collection<string, APIInteractionDataResolvedGuildMember>;
695
+ /** The roles this select picked. */
696
+ protected get roles(): Collection<string, APIRole>;
597
697
  }
598
698
  //#endregion
599
699
  //#region src/subscribers/index.d.ts
@@ -739,8 +839,8 @@ interface Ungateable {
739
839
  }
740
840
  type ProvidedContext<TCtor extends AnyHandlerCtor> = InstanceType<TCtor> extends RepliableHandler$1<infer Event> ? InteractionGateContext<Event> : Ungateable;
741
841
  type SelectData<Repliable> = Repliable extends APIMessageComponentSelectMenuInteraction ? Repliable['data'] : never;
742
- type SelectKindName<Data> = Data extends APIMessageStringSelectInteractionData ? 'StringSelect' : Data extends APIMessageUserSelectInteractionData ? 'UserSelect' : Data extends APIMessageRoleSelectInteractionData ? 'RoleSelect' : Data extends APIMessageChannelSelectInteractionData ? 'ChannelSelect' : Data extends APIMessageMentionableSelectInteractionData ? 'MentionableSelect' : 'an interaction';
743
- type KindName<Ctx> = Ctx extends Ungateable ? 'autocomplete' : Ctx extends GuildPermissionsContext ? 'gateway (guild permissions)' : Ctx extends InteractionGateContext<infer Repliable> ? Repliable extends APIChatInputApplicationCommandInteraction ? 'Slash' : Repliable extends APIMessageApplicationCommandInteraction ? 'MessageMenu' : Repliable extends APIUserApplicationCommandInteraction ? 'UserMenu' : Repliable extends APIMessageComponentSelectMenuInteraction ? SelectKindName<SelectData<Repliable>> : Repliable extends APIMessageComponentButtonInteraction ? 'Button' : Repliable extends APIModalSubmitInteraction ? 'Modal' : 'an interaction' : 'an agnostic';
842
+ type SelectKindName<Data> = Data extends APIMessageStringSelectInteractionData ? 'StringMenu' : Data extends APIMessageUserSelectInteractionData ? 'UserMenu' : Data extends APIMessageRoleSelectInteractionData ? 'RoleMenu' : Data extends APIMessageChannelSelectInteractionData ? 'ChannelMenu' : Data extends APIMessageMentionableSelectInteractionData ? 'MentionableMenu' : 'an interaction';
843
+ type KindName<Ctx> = Ctx extends Ungateable ? 'autocomplete' : Ctx extends GuildPermissionsContext ? 'gateway (guild permissions)' : Ctx extends InteractionGateContext<infer Repliable> ? Repliable extends APIChatInputApplicationCommandInteraction ? 'Slash' : Repliable extends APIMessageApplicationCommandInteraction ? 'MessageContextMenu' : Repliable extends APIUserApplicationCommandInteraction ? 'UserContextMenu' : Repliable extends APIMessageComponentSelectMenuInteraction ? SelectKindName<SelectData<Repliable>> : Repliable extends APIMessageComponentButtonInteraction ? 'Button' : Repliable extends APIModalSubmitInteraction ? 'Modal' : 'an interaction' : 'an agnostic';
744
844
  type FitAll<TCtor extends AnyHandlerCtor, Gates extends readonly Gate<GateContextBase>[]> = { [Index in keyof Gates]: GateFitsWith<ProvidedContext<TCtor>, KindName<ProvidedContext<TCtor>>, Gates[Index], KindName<RequiredOf<Gates[Index]>>>; };
745
845
  //#endregion
746
846
  //#region src/gates/Gated.d.ts
@@ -781,5 +881,5 @@ declare function Gated<const Gates extends NonEmptyTuple<Gate<GateContextBase>>>
781
881
  //#region src/version.d.ts
782
882
  declare const version: string;
783
883
  //#endregion
784
- export { EngineContext as A, SentMessage as C, SelectedMentionables as D, ModalFields as E, HttpConfig as M, HttpEdgeConfig as N, SlashOptions$1 as O, HttpServerConfig as P, ReplySender as S, InjectedEmojiMap as T, UserContextMenuHandler as _, CursorSource as a, RepliableHandler$1 as b, PageContext as c, SelectMenuHandler as d, ModalHandler as f, MessageContextMenuHandler as g, AutocompleteHandler as h, ArraySource as i, Core as j, createSeedcord as k, Subscriber$1 as l, ComponentHandler as m, Gated as n, PageSource as o, ButtonHandler as p, InteractionGateContext as r, Paginator as s, version as t, WebhookLog$1 as u, SlashHandler as v, Emojis as w, InteractionRef as x, InteractionHandler as y };
785
- //# sourceMappingURL=edge.index-LQtTs595.d.mts.map
884
+ export { InjectedEmojiMap as A, SlashHandler as C, ReplySender as D, InteractionRef as E, EngineContext as F, Core as I, HttpConfig as L, SelectedMentionables as M, SlashOptions$1 as N, SentMessage as O, createSeedcord as P, HttpEdgeConfig as R, UserContextMenuHandler as S, RepliableHandler$1 as T, ModalHandler as _, CursorSource as a, AutocompleteHandler as b, PageContext as c, ChannelMenuHandler as d, MentionableMenuHandler as f, UserMenuHandler as g, StringMenuHandler as h, ArraySource as i, ModalFields as j, Emojis as k, Subscriber$1 as l, SelectMenuHandler as m, Gated as n, PageSource as o, RoleMenuHandler as p, InteractionGateContext as r, Paginator as s, version as t, WebhookLog$1 as u, ButtonHandler as v, InteractionHandler as w, MessageContextMenuHandler as x, ComponentHandler as y, HttpServerConfig as z };
885
+ //# sourceMappingURL=edge.index-LAWTa6NI.d.mts.map
@@ -1,5 +1,5 @@
1
- import { A as EngineContext, C as SentMessage, D as SelectedMentionables, E as ModalFields, M as HttpConfig, N as HttpEdgeConfig, O as SlashOptions, P as HttpServerConfig, S as ReplySender, T as InjectedEmojiMap, _ as UserContextMenuHandler, a as CursorSource, b as RepliableHandler, c as PageContext, d as SelectMenuHandler, f as ModalHandler, g as MessageContextMenuHandler, h as AutocompleteHandler, i as ArraySource, j as Core, k as createSeedcord, l as Subscriber, m as ComponentHandler, n as Gated, o as PageSource, p as ButtonHandler, r as InteractionGateContext, s as Paginator, t as version, u as WebhookLog, v as SlashHandler, w as Emojis, x as InteractionRef, y as InteractionHandler } from "./edge.index-LQtTs595.mjs";
2
- import { t as RouteManifest } from "./RouteManifest-DTxI4fS0.mjs";
1
+ import { A as InjectedEmojiMap, C as SlashHandler, D as ReplySender, E as InteractionRef, F as EngineContext, I as Core, L as HttpConfig, M as SelectedMentionables, N as SlashOptions, O as SentMessage, P as createSeedcord, R as HttpEdgeConfig, S as UserContextMenuHandler, T as RepliableHandler, _ as ModalHandler, a as CursorSource, b as AutocompleteHandler, c as PageContext, d as ChannelMenuHandler, f as MentionableMenuHandler, g as UserMenuHandler, h as StringMenuHandler, i as ArraySource, j as ModalFields, k as Emojis, l as Subscriber, m as SelectMenuHandler, n as Gated, o as PageSource, p as RoleMenuHandler, r as InteractionGateContext, s as Paginator, t as version, u as WebhookLog, v as ButtonHandler, w as InteractionHandler, x as MessageContextMenuHandler, y as ComponentHandler, z as HttpServerConfig } from "./edge.index-LAWTa6NI.mjs";
2
+ import { t as RouteManifest } from "./RouteManifest-D7qXj8Ts.mjs";
3
3
  export * from "@seedcord/logger";
4
4
  export * from "@seedcord/core";
5
5
  export * from "@seedcord/errors";
@@ -7,4 +7,4 @@ export * from "@seedcord/rate-limiter";
7
7
  export * from "@seedcord/event-emitter";
8
8
  export * from "@seedcord/utils";
9
9
  export type * from "@seedcord/types";
10
- export { ArraySource, AutocompleteHandler, ButtonHandler, ComponentHandler, type Core, CursorSource, Emojis, type EngineContext, Gated, type HttpConfig, type HttpEdgeConfig, type HttpServerConfig, type InjectedEmojiMap, type InteractionGateContext, InteractionHandler, type InteractionRef, MessageContextMenuHandler, ModalFields, ModalHandler, type PageContext, type PageSource, Paginator, RepliableHandler, ReplySender, type RouteManifest, SelectMenuHandler, type SelectedMentionables, type SentMessage, SlashHandler, type SlashOptions, Subscriber, UserContextMenuHandler, WebhookLog, createSeedcord, version };
10
+ export { ArraySource, AutocompleteHandler, ButtonHandler, ChannelMenuHandler, ComponentHandler, type Core, CursorSource, Emojis, type EngineContext, Gated, type HttpConfig, type HttpEdgeConfig, type HttpServerConfig, type InjectedEmojiMap, type InteractionGateContext, InteractionHandler, type InteractionRef, MentionableMenuHandler, MessageContextMenuHandler, ModalFields, ModalHandler, type PageContext, type PageSource, Paginator, RepliableHandler, ReplySender, RoleMenuHandler, type RouteManifest, SelectMenuHandler, type SelectedMentionables, type SentMessage, SlashHandler, type SlashOptions, StringMenuHandler, Subscriber, UserContextMenuHandler, UserMenuHandler, WebhookLog, createSeedcord, version };
@@ -1,4 +1,4 @@
1
- import { C as RepliableHandler, S as AutocompleteHandler, _ as ModalFields, a as Paginator, c as SelectMenuHandler, d as ComponentHandler, f as MessageContextMenuHandler, g as Emojis, i as CursorSource, l as ModalHandler, m as SlashHandler, n as Gated, o as Subscriber, p as UserContextMenuHandler, r as ArraySource, s as WebhookLog, t as version, u as ButtonHandler, v as createSeedcord, w as ReplySender, x as InteractionHandler } from "./edge.index-B4x6VSJl.mjs";
1
+ import { C as createSeedcord, D as AutocompleteHandler, E as InteractionHandler, O as RepliableHandler, S as ModalFields, _ as MessageContextMenuHandler, a as Paginator, c as ChannelMenuHandler, d as SelectMenuHandler, f as StringMenuHandler, g as ComponentHandler, h as ButtonHandler, i as CursorSource, k as ReplySender, l as MentionableMenuHandler, m as ModalHandler, n as Gated, o as Subscriber, p as UserMenuHandler, r as ArraySource, s as WebhookLog, t as version, u as RoleMenuHandler, v as UserContextMenuHandler, x as Emojis, y as SlashHandler } from "./edge.index-CWUU_d_X.mjs";
2
2
 
3
3
  export * from "@seedcord/logger"
4
4
 
@@ -12,4 +12,4 @@ export * from "@seedcord/event-emitter"
12
12
 
13
13
  export * from "@seedcord/utils"
14
14
 
15
- export { ArraySource, AutocompleteHandler, ButtonHandler, ComponentHandler, CursorSource, Emojis, Gated, InteractionHandler, MessageContextMenuHandler, ModalFields, ModalHandler, Paginator, RepliableHandler, ReplySender, SelectMenuHandler, SlashHandler, Subscriber, UserContextMenuHandler, WebhookLog, createSeedcord, version };
15
+ export { ArraySource, AutocompleteHandler, ButtonHandler, ChannelMenuHandler, ComponentHandler, CursorSource, Emojis, Gated, InteractionHandler, MentionableMenuHandler, MessageContextMenuHandler, ModalFields, ModalHandler, Paginator, RepliableHandler, ReplySender, RoleMenuHandler, SelectMenuHandler, SlashHandler, StringMenuHandler, Subscriber, UserContextMenuHandler, UserMenuHandler, WebhookLog, createSeedcord, version };
package/dist/index.d.mts CHANGED
@@ -1,5 +1,5 @@
1
- import { A as EngineContext, C as SentMessage, D as SelectedMentionables, E as ModalFields, M as HttpConfig, N as HttpEdgeConfig, O as SlashOptions, P as HttpServerConfig, S as ReplySender, T as InjectedEmojiMap, _ as UserContextMenuHandler, a as CursorSource, b as RepliableHandler, c as PageContext, d as SelectMenuHandler, f as ModalHandler, g as MessageContextMenuHandler, h as AutocompleteHandler, i as ArraySource, j as Core, k as createSeedcord, l as Subscriber, m as ComponentHandler, n as Gated, o as PageSource, p as ButtonHandler, r as InteractionGateContext, s as Paginator, t as version, u as WebhookLog, v as SlashHandler, w as Emojis, x as InteractionRef, y as InteractionHandler } from "./edge.index-LQtTs595.mjs";
2
- import { t as RouteManifest } from "./RouteManifest-DTxI4fS0.mjs";
1
+ import { A as InjectedEmojiMap, C as SlashHandler, D as ReplySender, E as InteractionRef, F as EngineContext, I as Core, L as HttpConfig, M as SelectedMentionables, N as SlashOptions, O as SentMessage, P as createSeedcord, R as HttpEdgeConfig, S as UserContextMenuHandler, T as RepliableHandler, _ as ModalHandler, a as CursorSource, b as AutocompleteHandler, c as PageContext, d as ChannelMenuHandler, f as MentionableMenuHandler, g as UserMenuHandler, h as StringMenuHandler, i as ArraySource, j as ModalFields, k as Emojis, l as Subscriber, m as SelectMenuHandler, n as Gated, o as PageSource, p as RoleMenuHandler, r as InteractionGateContext, s as Paginator, t as version, u as WebhookLog, v as ButtonHandler, w as InteractionHandler, x as MessageContextMenuHandler, y as ComponentHandler, z as HttpServerConfig } from "./edge.index-LAWTa6NI.mjs";
2
+ import { t as RouteManifest } from "./RouteManifest-D7qXj8Ts.mjs";
3
3
  import "reflect-metadata";
4
4
  import { REST } from "@discordjs/rest";
5
5
  import { Bus } from "@seedcord/core";
@@ -87,5 +87,5 @@ declare abstract class Plugin<Opts extends HttpPluginOptions = {
87
87
  transport: 'http';
88
88
  }> extends Plugin$1<Opts, Core> {}
89
89
  //#endregion
90
- export { ArraySource, AutocompleteHandler, ButtonHandler, ComponentHandler, type Core, CursorSource, Emojis, type EngineContext, Gated, type HttpConfig, type HttpEdgeConfig, type HttpPluginOptions, type HttpServerConfig, type InjectedEmojiMap, type InteractionGateContext, InteractionHandler, type InteractionRef, MessageContextMenuHandler, ModalFields, ModalHandler, type PageContext, type PageSource, Paginator, Plugin, type PluginLifecycleSpec, type PluginOptions, RepliableHandler, ReplySender, type RouteManifest, Seedcord, SelectMenuHandler, type SelectedMentionables, type SentMessage, SlashHandler, type SlashOptions, Subscriber, UserContextMenuHandler, WebhookLog, WinstonConsoleSink, WinstonFileSink, createSeedcord, version };
90
+ export { ArraySource, AutocompleteHandler, ButtonHandler, ChannelMenuHandler, ComponentHandler, type Core, CursorSource, Emojis, type EngineContext, Gated, type HttpConfig, type HttpEdgeConfig, type HttpPluginOptions, type HttpServerConfig, type InjectedEmojiMap, type InteractionGateContext, InteractionHandler, type InteractionRef, MentionableMenuHandler, MessageContextMenuHandler, ModalFields, ModalHandler, type PageContext, type PageSource, Paginator, Plugin, type PluginLifecycleSpec, type PluginOptions, RepliableHandler, ReplySender, RoleMenuHandler, type RouteManifest, Seedcord, SelectMenuHandler, type SelectedMentionables, type SentMessage, SlashHandler, type SlashOptions, StringMenuHandler, Subscriber, UserContextMenuHandler, UserMenuHandler, WebhookLog, WinstonConsoleSink, WinstonFileSink, createSeedcord, version };
91
91
  //# sourceMappingURL=index.d.mts.map
package/dist/index.mjs CHANGED
@@ -1,11 +1,11 @@
1
- import { C as RepliableHandler, S as AutocompleteHandler, _ as ModalFields, a as Paginator, b as buildRouteMaps, c as SelectMenuHandler, d as ComponentHandler, f as MessageContextMenuHandler, g as Emojis, h as EmojiInjector, i as CursorSource, l as ModalHandler, m as SlashHandler, n as Gated, o as Subscriber, p as UserContextMenuHandler, r as ArraySource, s as WebhookLog, t as version, u as ButtonHandler, v as createSeedcord, w as ReplySender, x as InteractionHandler, y as buildEngine } from "./edge.index-B4x6VSJl.mjs";
1
+ import { C as createSeedcord, D as AutocompleteHandler, E as InteractionHandler, O as RepliableHandler, S as ModalFields, T as buildRouteMaps, _ as MessageContextMenuHandler, a as Paginator, b as EmojiInjector, c as ChannelMenuHandler, d as SelectMenuHandler, f as StringMenuHandler, g as ComponentHandler, h as ButtonHandler, i as CursorSource, k as ReplySender, l as MentionableMenuHandler, m as ModalHandler, n as Gated, o as Subscriber, p as UserMenuHandler, r as ArraySource, s as WebhookLog, t as version, u as RoleMenuHandler, v as UserContextMenuHandler, w as buildEngine, x as Emojis, y as SlashHandler } from "./edge.index-CWUU_d_X.mjs";
2
2
  import "reflect-metadata";
3
- import { HmrManager, InteractionMetadataKey, InteractionRoutes, busLoggerOf, getDevChannel, interactionRoutesOf, setBotColor } from "@seedcord/core/internal";
3
+ import { HmrManager, InteractionMetadataKey, busLoggerOf, getDevChannel, interactionRoutesOf, setBotColor } from "@seedcord/core/internal";
4
4
  import { SeedcordError, applicationIdFromToken, validateDiscordToken } from "@seedcord/errors/internal";
5
5
  import { Logger, LoggerChannelRegistry } from "@seedcord/logger";
6
6
  import { Envapter } from "envapt";
7
7
  import { REST } from "@discordjs/rest";
8
- import { Bus } from "@seedcord/core";
8
+ import { Bus, InteractionKind } from "@seedcord/core";
9
9
  import { SeedcordErrorCode, paint } from "@seedcord/errors";
10
10
  import { MemoryRateLimiter } from "@seedcord/rate-limiter";
11
11
  import { Routes } from "discord-api-types/v10";
@@ -13,7 +13,7 @@ import { formatFilePath } from "@seedcord/utils";
13
13
  import { once } from "node:events";
14
14
  import { createServer } from "node:http";
15
15
  import { CoordinatedShutdown, CoordinatedStartup, Pluggable } from "@seedcord/core/node";
16
- import { CommandRegistry, ShutdownPhase, StartupPhase, SubscriberLoader, shutdownOf } from "@seedcord/core/node/internal";
16
+ import { CommandRegistry, DRAIN_TASK_TIMEOUT_MS, DRAIN_WINDOW_MS, ShutdownPhase, StartupPhase, SubscriberLoader, drainInFlight, shutdownOf } from "@seedcord/core/node/internal";
17
17
  import { WinstonConsoleSink, WinstonFileSink, installNodeDefaults } from "@seedcord/logger/node";
18
18
  import { HostAugmentTarget, HostVersion, SeedcordBrand } from "@seedcord/types/internal";
19
19
  import { HmrModuleHandler } from "@seedcord/core/hmr";
@@ -47,7 +47,6 @@ const EMPTY_MANIFEST = {
47
47
  var InteractionDispatcher = class {
48
48
  handlersDir;
49
49
  maps;
50
- targets;
51
50
  /** @internal */
52
51
  logger = new Logger("Interactions", { channel: "interactions" });
53
52
  isInitialized = false;
@@ -58,7 +57,6 @@ var InteractionDispatcher = class {
58
57
  constructor(handlersDir) {
59
58
  this.handlersDir = handlersDir;
60
59
  this.maps = buildRouteMaps(EMPTY_MANIFEST);
61
- this.targets = this.buildTargets();
62
60
  if (!Envapter.isDevelopment && !Envapter.isTest) return;
63
61
  this.hmrHandler = new HmrModuleHandler({
64
62
  handlersDir,
@@ -93,11 +91,13 @@ var InteractionDispatcher = class {
93
91
  await this.hmrHandler?.handle(event);
94
92
  }
95
93
  warnUnhandledRoutes(commandLeaves) {
96
- this.warnMissing(commandLeaves, this.maps.slash, "Slash route", "@SlashRoute");
94
+ this.warnMissing(commandLeaves, this.maps[InteractionKind.Slash], "Slash route", "@SlashRoute");
97
95
  }
98
96
  warnUnhandledContextMenuRoutes(leaves) {
99
- this.warnMissing(leaves.user, this.maps.userContextMenu, "User context menu", "@ContextMenuRoute");
100
- this.warnMissing(leaves.message, this.maps.messageContextMenu, "Message context menu", "@ContextMenuRoute");
97
+ const user = this.maps[InteractionKind.UserContextMenu];
98
+ const message = this.maps[InteractionKind.MessageContextMenu];
99
+ this.warnMissing(leaves.user, user, "User context menu", "@ContextMenuRoute");
100
+ this.warnMissing(leaves.message, message, "Message context menu", "@ContextMenuRoute");
101
101
  }
102
102
  warnMissing(names, map, label, decorator) {
103
103
  for (const name of names) {
@@ -114,84 +114,33 @@ var InteractionDispatcher = class {
114
114
  for (const [routeId, owner] of this.rowOwners) if (owner.ctor === ctor) routeIds.push(routeId);
115
115
  return routeIds;
116
116
  }
117
- targetFor(route) {
118
- return this.targets[route];
119
- }
120
- buildTargets() {
121
- return {
122
- [InteractionRoutes.Slash]: {
123
- map: this.maps.slash,
124
- kind: "slash"
125
- },
126
- [InteractionRoutes.UserContextMenu]: {
127
- map: this.maps.userContextMenu,
128
- kind: "userContextMenu"
129
- },
130
- [InteractionRoutes.MessageContextMenu]: {
131
- map: this.maps.messageContextMenu,
132
- kind: "messageContextMenu"
133
- },
134
- [InteractionRoutes.Autocomplete]: {
135
- map: this.maps.autocomplete,
136
- kind: "autocomplete"
137
- },
138
- [InteractionRoutes.Button]: {
139
- map: this.maps.components.button,
140
- kind: "button"
141
- },
142
- [InteractionRoutes.StringMenu]: {
143
- map: this.maps.components.stringSelect,
144
- kind: "stringMenu"
145
- },
146
- [InteractionRoutes.UserMenu]: {
147
- map: this.maps.components.userSelect,
148
- kind: "userMenu"
149
- },
150
- [InteractionRoutes.RoleMenu]: {
151
- map: this.maps.components.roleSelect,
152
- kind: "roleMenu"
153
- },
154
- [InteractionRoutes.ChannelMenu]: {
155
- map: this.maps.components.channelSelect,
156
- kind: "channelMenu"
157
- },
158
- [InteractionRoutes.MentionableMenu]: {
159
- map: this.maps.components.mentionableSelect,
160
- kind: "mentionableMenu"
161
- },
162
- [InteractionRoutes.Modal]: {
163
- map: this.maps.components.modal,
164
- kind: "modal"
165
- }
166
- };
167
- }
168
117
  registerHandler(ctor, relativePath) {
169
118
  const from = formatFilePath(relativePath);
170
119
  const writes = [];
171
- for (const [route, keys] of interactionRoutesOf(ctor)) {
172
- const target = this.targetFor(route);
173
- for (const key of keys) {
174
- const routeId = `${target.kind}:${key}`;
175
- const existing = this.rowOwners.get(routeId);
176
- if (existing && existing.ctor !== ctor) throw new SeedcordError(SeedcordErrorCode.InteractionDuplicateRoute, [
177
- routeId,
178
- `${existing.ctor.name} (${existing.from})`,
179
- `${ctor.name} (${from})`
180
- ]);
181
- writes.push([target, key]);
182
- }
120
+ for (const [kind, keys] of interactionRoutesOf(ctor)) for (const key of keys) {
121
+ const routeId = `${kind}:${key}`;
122
+ const existing = this.rowOwners.get(routeId);
123
+ if (existing && existing.ctor !== ctor) throw new SeedcordError(SeedcordErrorCode.InteractionDuplicateRoute, [
124
+ routeId,
125
+ `${existing.ctor.name} (${existing.from})`,
126
+ `${ctor.name} (${from})`
127
+ ]);
128
+ writes.push({
129
+ kind,
130
+ key
131
+ });
183
132
  }
184
133
  if (writes.length === 0) return;
185
- for (const [target, key] of writes) {
186
- const routeId = `${target.kind}:${key}`;
187
- target.map.set(key, {
188
- kind: target.kind,
134
+ for (const { kind, key } of writes) {
135
+ const routeId = `${kind}:${key}`;
136
+ this.maps[kind].set(key, {
137
+ kind,
189
138
  routeId,
190
139
  load: () => Promise.resolve(ctor)
191
140
  });
192
141
  this.rowOwners.set(routeId, {
193
142
  ctor,
194
- target,
143
+ kind,
195
144
  key,
196
145
  from
197
146
  });
@@ -207,7 +156,7 @@ var InteractionDispatcher = class {
207
156
  const owner = this.rowOwners.get(routeId);
208
157
  if (owner?.ctor !== ctor) continue;
209
158
  this.rowOwners.delete(routeId);
210
- owner.target.map.delete(owner.key);
159
+ this.maps[owner.kind].delete(owner.key);
211
160
  }
212
161
  }
213
162
  };
@@ -246,7 +195,6 @@ async function writeWebResponse(response, out) {
246
195
  //#region src/node/Seedcord.ts
247
196
  const DEFAULT_PORT = 3e3;
248
197
  const SERVER_SHUTDOWN_TIMEOUT_MS = 5e3;
249
- const DRAIN_TIMEOUT_MS = 1e4;
250
198
  /**
251
199
  * The HTTP-interactions bot host, a long-running node server around the engine.
252
200
  *
@@ -279,7 +227,7 @@ var Seedcord = class Seedcord extends Pluggable {
279
227
  boundPort;
280
228
  fetchedUsername;
281
229
  constructor(config) {
282
- super(new CoordinatedShutdown(), new CoordinatedStartup());
230
+ super(new CoordinatedShutdown(config.lifecycle?.shutdownDeadline), new CoordinatedStartup());
283
231
  this.config = config;
284
232
  installNodeDefaults(config.logger);
285
233
  setBotColor(config.botColor);
@@ -382,9 +330,7 @@ var Seedcord = class Seedcord extends Pluggable {
382
330
  this.logger.info(`Interactions server listening on port ${paint.sky.bold(String(this.boundPort))}`);
383
331
  getDevChannel()?.send("seedcord:server-listening", { port: this.boundPort });
384
332
  this.shutdown.addTask(ShutdownPhase.Unbind, "stop-http-server", () => this.stopServer(), SERVER_SHUTDOWN_TIMEOUT_MS);
385
- this.shutdown.addTask(ShutdownPhase.Drain, "drain-inflight", async () => {
386
- await Promise.allSettled(inFlight);
387
- }, DRAIN_TIMEOUT_MS);
333
+ this.shutdown.addTask(ShutdownPhase.Drain, "drain-inflight", () => drainInFlight(inFlight, DRAIN_WINDOW_MS, this.logger, "Interactions"), DRAIN_TASK_TIMEOUT_MS);
388
334
  }
389
335
  async fetchUsername() {
390
336
  try {
@@ -425,5 +371,5 @@ var Seedcord = class Seedcord extends Pluggable {
425
371
  var Plugin = class extends Plugin$1 {};
426
372
 
427
373
  //#endregion
428
- export { ArraySource, AutocompleteHandler, ButtonHandler, ComponentHandler, CursorSource, Emojis, Gated, InteractionHandler, MessageContextMenuHandler, ModalFields, ModalHandler, Paginator, Plugin, RepliableHandler, ReplySender, Seedcord, SelectMenuHandler, SlashHandler, Subscriber, UserContextMenuHandler, WebhookLog, WinstonConsoleSink, WinstonFileSink, createSeedcord, version };
374
+ export { ArraySource, AutocompleteHandler, ButtonHandler, ChannelMenuHandler, ComponentHandler, CursorSource, Emojis, Gated, InteractionHandler, MentionableMenuHandler, MessageContextMenuHandler, ModalFields, ModalHandler, Paginator, Plugin, RepliableHandler, ReplySender, RoleMenuHandler, Seedcord, SelectMenuHandler, SlashHandler, StringMenuHandler, Subscriber, UserContextMenuHandler, UserMenuHandler, WebhookLog, WinstonConsoleSink, WinstonFileSink, createSeedcord, version };
429
375
  //# sourceMappingURL=index.mjs.map