@seedcord/http 0.5.1 → 0.6.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,4 +1,4 @@
1
- import { SelectMenuKind, SubscriptionKey } from "@seedcord/core";
1
+ import { InteractionKind, SubscriptionKey } from "@seedcord/core";
2
2
  import { ApplicationCommandType } from "discord-api-types/v10";
3
3
  import { EventFrequency } from "@seedcord/types";
4
4
  //#region src/manifest/RouteManifest.d.ts
@@ -27,7 +27,7 @@ interface CommandRoute extends RouteModule {
27
27
  * the receiver routes by (the routeKey minus its layout hash).
28
28
  */
29
29
  interface ComponentRoute extends RouteModule {
30
- readonly kind: 'button' | `${SelectMenuKind}Select` | 'modal';
30
+ readonly kind: InteractionKind.Button | InteractionKind.Modal | InteractionKind.StringMenu | InteractionKind.UserMenu | InteractionKind.RoleMenu | InteractionKind.ChannelMenu | InteractionKind.MentionableMenu;
31
31
  readonly prefix: string;
32
32
  }
33
33
  /**
@@ -61,4 +61,4 @@ interface RouteManifest {
61
61
  }
62
62
  //#endregion
63
63
  export { RouteManifest as t };
64
- //# sourceMappingURL=RouteManifest-DTxI4fS0.d.mts.map
64
+ //# sourceMappingURL=RouteManifest-D7qXj8Ts.d.mts.map
@@ -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";
@@ -120,9 +121,9 @@ type SlashOptions$1<Route extends keyof SlashRegistry> = SlashOptions<Route, Htt
120
121
  type FieldKind = ModalSubmitComponent['type'];
121
122
  /** The users, members, and roles a mentionable select picked. */
122
123
  interface SelectedMentionables {
123
- users: Map<string, APIUser>;
124
- members: Map<string, APIInteractionDataResolvedGuildMember>;
125
- roles: Map<string, APIRole>;
124
+ users: Collection<string, APIUser>;
125
+ members: Collection<string, APIInteractionDataResolvedGuildMember>;
126
+ roles: Collection<string, APIRole>;
126
127
  }
127
128
  /**
128
129
  * The fields a modal carries, read by custom id.
@@ -131,7 +132,7 @@ interface SelectedMentionables {
131
132
  * kind that getter does not read. The message names the getter that does.
132
133
  *
133
134
  * 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.
135
+ * `Collection` keyed by id. A field that picked nothing returns null. Pass `required` to throw there instead.
135
136
  */
136
137
  declare class ModalFields {
137
138
  private readonly entries;
@@ -152,19 +153,19 @@ declare class ModalFields {
152
153
  getField(customId: string): ModalSubmitComponent;
153
154
  getTextInputValue(customId: string): string;
154
155
  getStringSelectValues(customId: string): string[];
155
- getSelectedUsers(customId: string, required: true): Map<string, APIUser>;
156
- getSelectedUsers(customId: string, required?: boolean): Map<string, APIUser> | null;
156
+ getSelectedUsers(customId: string, required: true): Collection<string, APIUser>;
157
+ getSelectedUsers(customId: string, required?: boolean): Collection<string, APIUser> | null;
157
158
  /** 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;
159
+ getSelectedMembers(customId: string): Collection<string, APIInteractionDataResolvedGuildMember> | null;
160
+ getSelectedRoles(customId: string, required: true): Collection<string, APIRole>;
161
+ getSelectedRoles(customId: string, required?: boolean): Collection<string, APIRole> | null;
161
162
  /** 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;
163
+ getSelectedChannels(customId: string, required: true, channelTypes?: readonly ChannelType[]): Collection<string, APIInteractionDataResolvedChannel>;
164
+ getSelectedChannels(customId: string, required?: boolean, channelTypes?: readonly ChannelType[]): Collection<string, APIInteractionDataResolvedChannel> | null;
164
165
  getSelectedMentionables(customId: string, required: true): SelectedMentionables;
165
166
  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;
167
+ getUploadedFiles(customId: string, required: true): Collection<string, APIAttachment>;
168
+ getUploadedFiles(customId: string, required?: boolean): Collection<string, APIAttachment> | null;
168
169
  getRadioGroup(customId: string, required: true): string;
169
170
  getRadioGroup(customId: string, required?: boolean): string | null;
170
171
  getCheckboxGroup(customId: string): string[];
@@ -222,8 +223,8 @@ type Repliables = Exclude<ValidInteractionTypes, APIApplicationCommandAutocomple
222
223
  * Shared base the repliable HTTP interaction handlers extend.
223
224
  *
224
225
  * 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.
226
+ * {@link ContextMenuHandler}, or one of the select menu bases instead. This class binds the core
227
+ * reply base to the http sender.
227
228
  *
228
229
  * @typeParam Event - The repliable interaction type this handler processes
229
230
  */
@@ -244,8 +245,8 @@ declare abstract class RepliableHandler$1<Event extends Repliables> extends Repl
244
245
  * Shared base the repliable interaction handlers extend.
245
246
  *
246
247
  * 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.
248
+ * {@link ModalHandler}, or one of the select menu bases instead. This class adds `showModal` on top
249
+ * of the reply members.
249
250
  *
250
251
  * @typeParam Event - The repliable interaction type this handler processes
251
252
  */
@@ -443,9 +444,9 @@ declare abstract class AutocompleteHandler<Route extends keyof SlashRegistry> ex
443
444
  /**
444
445
  * Shared base the customId-routed component handlers extend on the HTTP transport.
445
446
  *
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`.
447
+ * Not a public entry point. Extend {@link ButtonHandler}, {@link ModalHandler}, or one of the select menu
448
+ * bases instead. This class defines the customId decode, the route matching, and the source-message
449
+ * verbs `update` and `deferUpdate`.
449
450
  *
450
451
  * @typeParam Event - The component or modal interaction type this handler processes
451
452
  * @typeParam Defs - The customId route definitions registered on the concrete handler
@@ -510,7 +511,7 @@ declare abstract class ComponentHandler<Event extends APIMessageComponentInterac
510
511
  */
511
512
  declare abstract class ButtonHandler<Defs extends readonly AnyCustomId[]> extends ComponentHandler<APIMessageComponentButtonInteraction, Defs> {
512
513
  /** @internal */
513
- readonly [ComponentKindBrand]?: 'button';
514
+ readonly [ComponentKindBrand]?: InteractionKind.Button;
514
515
  }
515
516
  //#endregion
516
517
  //#region src/handlers/interaction/components/ModalHandler.d.ts
@@ -537,7 +538,7 @@ declare abstract class ButtonHandler<Defs extends readonly AnyCustomId[]> extend
537
538
  */
538
539
  declare abstract class ModalHandler<Defs extends readonly AnyCustomId[]> extends ComponentHandler<APIModalSubmitInteraction, Defs> {
539
540
  /** @internal */
540
- readonly [ComponentKindBrand]?: 'modal';
541
+ readonly [ComponentKindBrand]?: InteractionKind.Modal;
541
542
  private reader?;
542
543
  /** The fields this modal submitted, read by custom id. */
543
544
  protected get fields(): ModalFields;
@@ -549,29 +550,59 @@ declare abstract class ModalHandler<Defs extends readonly AnyCustomId[]> extends
549
550
  }
550
551
  //#endregion
551
552
  //#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;
553
+ type SelectInteraction<Data> = APIMessageComponentSelectMenuInteraction & {
554
+ data: Data;
557
555
  };
558
556
  /**
559
- * Base class for a select menu handler on the HTTP transport.
557
+ * Shared base the select menu handlers extend on the HTTP transport.
560
558
  *
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`.
559
+ * Not a public entry point. Extend {@link StringMenuHandler}, {@link UserMenuHandler},
560
+ * {@link RoleMenuHandler}, {@link ChannelMenuHandler}, or {@link MentionableMenuHandler} instead. This
561
+ * class defines the `values` getter those bases share.
564
562
  *
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`.
563
+ * @typeParam Event - The select menu interaction type this handler processes
564
+ * @typeParam Defs - The customId route definitions registered on the concrete handler
565
+ */
566
+ declare abstract class SelectMenuHandler<Event extends APIMessageComponentSelectMenuInteraction, Defs extends readonly AnyCustomId[]> extends ComponentHandler<Event, Defs> {
567
+ /** The values this select picked. On every kind but the string menu they are snowflake ids. */
568
+ protected get values(): string[];
569
+ }
570
+ /**
571
+ * Base class for a string select menu handler on the HTTP transport.
572
+ *
573
+ * Register the customId definitions with `@StringMenuRoute`, list the same ones in the generic, then read
574
+ * the chosen option values from `this.values`. Read `this.params` for a single route or `this.match` for
575
+ * several. Reply through the handler members, or rewrite the source message with `this.update`.
576
+ *
577
+ * @typeParam Defs - The customId definitions this handler decodes, e.g. `[typeof TopicsId]`.
578
+ *
579
+ * @example
580
+ * ```ts
581
+ * \@StringMenuRoute(TopicsId)
582
+ * class Topics extends StringMenuHandler<[typeof TopicsId]> {
583
+ * async execute() {
584
+ * const { userId } = this.params;
585
+ * await this.update(`<@${userId}> now follows ${this.values.join(', ')}`);
586
+ * }
587
+ * }
588
+ * ```
589
+ */
590
+ declare abstract class StringMenuHandler<Defs extends readonly AnyCustomId[]> extends SelectMenuHandler<SelectInteraction<APIMessageStringSelectInteractionData>, Defs> {
591
+ /** @internal */
592
+ readonly [ComponentKindBrand]?: InteractionKind.StringMenu;
593
+ }
594
+ /**
595
+ * Base class for a user select menu handler on the HTTP transport.
596
+ *
597
+ * Beside `this.values` this handler declares `this.users` and `this.members`. Register the customId
598
+ * definitions with `@UserMenuRoute` and list the same ones in the generic.
567
599
  *
568
- * @typeParam Kind - The select kind from {@link SelectMenuKind}, e.g. `SelectMenuKind.User`.
569
600
  * @typeParam Defs - The customId definitions this handler decodes, e.g. `[typeof AssignId]`.
570
601
  *
571
602
  * @example
572
603
  * ```ts
573
- * \@SelectMenuRoute(SelectMenuKind.User, AssignId)
574
- * class AssignSelect extends SelectMenuHandler<SelectMenuKind.User, [typeof AssignId]> {
604
+ * \@UserMenuRoute(AssignId)
605
+ * class Assign extends UserMenuHandler<[typeof AssignId]> {
575
606
  * async execute() {
576
607
  * const { roleId } = this.params;
577
608
  * await this.reply(`assigning ${this.users.size} member(s) to <@&${roleId}>`);
@@ -579,21 +610,89 @@ type SelectMenuInteractionFor<Kind extends SelectMenuKind> = APIMessageComponent
579
610
  * }
580
611
  * ```
581
612
  */
582
- declare abstract class SelectMenuHandler<Kind extends SelectMenuKind, Defs extends readonly AnyCustomId[]> extends ComponentHandler<SelectMenuInteractionFor<Kind>, Defs> {
613
+ declare abstract class UserMenuHandler<Defs extends readonly AnyCustomId[]> extends SelectMenuHandler<SelectInteraction<APIMessageUserSelectInteractionData>, Defs> {
583
614
  /** @internal */
584
- readonly [ComponentKindBrand]?: Kind;
585
- private get selection();
586
- private resolvedMap;
587
- /** The ids this select picked. */
588
- protected get values(): string[];
615
+ readonly [ComponentKindBrand]?: InteractionKind.UserMenu;
589
616
  /** The users this select picked. */
590
- protected get users(): ResolvedFor<Kind, UserKinds, APIUser>;
617
+ protected get users(): Collection<string, APIUser>;
591
618
  /** The guild members behind the picked users. Discord resolves these only inside a guild. */
592
- protected get members(): ResolvedFor<Kind, UserKinds, APIInteractionDataResolvedGuildMember>;
619
+ protected get members(): Collection<string, APIInteractionDataResolvedGuildMember>;
620
+ }
621
+ /**
622
+ * Base class for a role select menu handler on the HTTP transport.
623
+ *
624
+ * Beside `this.values` this handler declares `this.roles`. Register the customId definitions with
625
+ * `@RoleMenuRoute` and list the same ones in the generic.
626
+ *
627
+ * @typeParam Defs - The customId definitions this handler decodes, e.g. `[typeof GrantId]`.
628
+ *
629
+ * @example
630
+ * ```ts
631
+ * \@RoleMenuRoute(GrantId)
632
+ * class Grant extends RoleMenuHandler<[typeof GrantId]> {
633
+ * async execute() {
634
+ * await this.update(`granting ${this.roles.size} role(s)`);
635
+ * }
636
+ * }
637
+ * ```
638
+ */
639
+ declare abstract class RoleMenuHandler<Defs extends readonly AnyCustomId[]> extends SelectMenuHandler<SelectInteraction<APIMessageRoleSelectInteractionData>, Defs> {
640
+ /** @internal */
641
+ readonly [ComponentKindBrand]?: InteractionKind.RoleMenu;
593
642
  /** The roles this select picked. */
594
- protected get roles(): ResolvedFor<Kind, RoleKinds, APIRole>;
643
+ protected get roles(): Collection<string, APIRole>;
644
+ }
645
+ /**
646
+ * Base class for a channel select menu handler on the HTTP transport.
647
+ *
648
+ * Beside `this.values` this handler declares `this.channels`. Register the customId definitions with
649
+ * `@ChannelMenuRoute` and list the same ones in the generic.
650
+ *
651
+ * @typeParam Defs - The customId definitions this handler decodes, e.g. `[typeof LogTargetId]`.
652
+ *
653
+ * @example
654
+ * ```ts
655
+ * \@ChannelMenuRoute(LogTargetId)
656
+ * class LogTarget extends ChannelMenuHandler<[typeof LogTargetId]> {
657
+ * async execute() {
658
+ * await this.update(`logging to ${this.channels.size} channel(s)`);
659
+ * }
660
+ * }
661
+ * ```
662
+ */
663
+ declare abstract class ChannelMenuHandler<Defs extends readonly AnyCustomId[]> extends SelectMenuHandler<SelectInteraction<APIMessageChannelSelectInteractionData>, Defs> {
664
+ /** @internal */
665
+ readonly [ComponentKindBrand]?: InteractionKind.ChannelMenu;
595
666
  /** The channels this select picked. */
596
- protected get channels(): ResolvedFor<Kind, SelectMenuKind.Channel, APIInteractionDataResolvedChannel>;
667
+ protected get channels(): Collection<string, APIInteractionDataResolvedChannel>;
668
+ }
669
+ /**
670
+ * Base class for a mentionable select menu handler on the HTTP transport.
671
+ *
672
+ * A mentionable menu accepts users and roles together. `this.users`, `this.members`, and `this.roles`
673
+ * can each come back empty.
674
+ *
675
+ * @typeParam Defs - The customId definitions this handler decodes, e.g. `[typeof InviteId]`.
676
+ *
677
+ * @example
678
+ * ```ts
679
+ * \@MentionableMenuRoute(InviteId)
680
+ * class Invite extends MentionableMenuHandler<[typeof InviteId]> {
681
+ * async execute() {
682
+ * await this.update(`inviting ${this.users.size} user(s) and ${this.roles.size} role(s)`);
683
+ * }
684
+ * }
685
+ * ```
686
+ */
687
+ declare abstract class MentionableMenuHandler<Defs extends readonly AnyCustomId[]> extends SelectMenuHandler<SelectInteraction<APIMessageMentionableSelectInteractionData>, Defs> {
688
+ /** @internal */
689
+ readonly [ComponentKindBrand]?: InteractionKind.MentionableMenu;
690
+ /** The users this select picked. */
691
+ protected get users(): Collection<string, APIUser>;
692
+ /** The guild members behind the picked users. Discord resolves these only inside a guild. */
693
+ protected get members(): Collection<string, APIInteractionDataResolvedGuildMember>;
694
+ /** The roles this select picked. */
695
+ protected get roles(): Collection<string, APIRole>;
597
696
  }
598
697
  //#endregion
599
698
  //#region src/subscribers/index.d.ts
@@ -739,8 +838,8 @@ interface Ungateable {
739
838
  }
740
839
  type ProvidedContext<TCtor extends AnyHandlerCtor> = InstanceType<TCtor> extends RepliableHandler$1<infer Event> ? InteractionGateContext<Event> : Ungateable;
741
840
  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';
841
+ 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';
842
+ 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
843
  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
844
  //#endregion
746
845
  //#region src/gates/Gated.d.ts
@@ -781,5 +880,5 @@ declare function Gated<const Gates extends NonEmptyTuple<Gate<GateContextBase>>>
781
880
  //#region src/version.d.ts
782
881
  declare const version: string;
783
882
  //#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
883
+ 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 };
884
+ //# sourceMappingURL=edge.index-BW-YQh7m.d.mts.map