discord-embed-router 0.1.0 → 0.2.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.
package/README.md CHANGED
@@ -1,3 +1,3 @@
1
1
  # discord-embed-router
2
2
 
3
- A url-based router for discord.js interaction messages
3
+ A url path based router for discord.js interaction messages
package/dist/index.d.mts CHANGED
@@ -1,19 +1,21 @@
1
1
  import { ParamData, Path, MatchFunction, MatchResult, TokenData } from 'path-to-regexp';
2
- import { Interaction, InteractionEditReplyOptions, ButtonInteraction, InteractionReplyOptions, ButtonBuilder } from 'discord.js';
2
+ import { Interaction, InteractionEditReplyOptions, ButtonInteraction, AnySelectMenuInteraction, InteractionReplyOptions, ButtonBuilder, APIButtonComponent, StringSelectMenuOptionBuilder, SelectMenuComponentOptionData, APISelectMenuOption, StringSelectMenuBuilder, StringSelectMenuComponentData, APIStringSelectComponent, RestOrArray, ChannelSelectMenuBuilder, ChannelSelectMenuComponentData, APIChannelSelectComponent, RoleSelectMenuBuilder, RoleSelectMenuComponentData, APIRoleSelectComponent, UserSelectMenuBuilder, UserSelectMenuComponentData, APIUserSelectComponent } from 'discord.js';
3
3
 
4
- type State<P extends ParamData> = MatchResult<P> & {
5
- searchParams: URLSearchParams;
4
+ type State<L, P extends ParamData = ParamData> = MatchResult<P> & {
5
+ embedRouter: EmbedRouter<L>;
6
+ locals?: L | undefined;
7
+ query: URLSearchParams;
6
8
  };
7
9
  type RouteResponse = InteractionEditReplyOptions;
8
- type RouteHandler<P extends ParamData> = (interaction: Interaction, state: State<P>) => RouteResponse;
9
- type CompiledRoute<P extends ParamData> = {
10
+ type RouteHandler<L, P extends ParamData = ParamData> = (interaction: Interaction, state: State<L, P>) => Promise<RouteResponse> | RouteResponse;
11
+ type CompiledRoute<L, P extends ParamData = ParamData> = {
10
12
  path: Path[];
11
13
  matchFunction: MatchFunction<P>;
12
- handler: RouteHandler<P>;
14
+ handler: RouteHandler<L, P>;
13
15
  };
14
- type ResolvedRoute<P extends ParamData> = {
15
- state: State<P>;
16
- handler: RouteHandler<P>;
16
+ type ResolvedRoute<L, P extends ParamData = ParamData> = {
17
+ state: State<L, P>;
18
+ handler: RouteHandler<L, P>;
17
19
  };
18
20
 
19
21
  type TakeIdentifier<T extends string, Name extends string = ""> = T extends `${infer Char}${infer Rest}` ? Char extends "/" | ":" | "*" | "{" | "}" ? [Name, T] : TakeIdentifier<Rest, `${Name}${Char}`> : [Name, T];
@@ -28,37 +30,43 @@ type ExtractParams<T extends string | TokenData, Depth extends string = ""> = T
28
30
  [K in Name]?: string;
29
31
  }) & ExtractParams<After, Depth> : ExtractParams<Rest, Depth> : Char extends "{" ? ExtractParams<Rest, `${Depth}1`> : Char extends "}" ? ExtractParams<Rest, Depth extends `1${infer Rest2}` ? Rest2 : Depth> : ExtractParams<Rest, Depth> : object : never;
30
32
 
31
- declare class EmbedRouter {
33
+ declare class EmbedRouter<L> {
32
34
  private static usedIdentifiers;
33
- private static generateUniqueIdentifier;
35
+ private name;
34
36
  private idPrefix;
37
+ private identifier;
35
38
  getIdPrefix(): string;
36
39
  private routes;
37
40
  /**
38
41
  *
42
+ * @param name the name to give the router. ensures buttons stay connected across restarts
39
43
  * @param idPrefix the prefix for RouteButtonBuilder customIds
40
44
  */
41
- constructor(idPrefix?: string);
45
+ constructor({ name, idPrefix, }?: {
46
+ name?: string;
47
+ idPrefix?: string;
48
+ });
49
+ private updateIdentifier;
42
50
  /**
43
51
  * Registers a path with the router
44
52
  *
45
53
  * @param routePath path to match with
46
54
  * @param handler function that generates the message when a path is matched
47
55
  */
48
- on<P extends Path = Path>(routePath: P | P[], handler: RouteHandler<ExtractParams<P>>): void;
56
+ get<P extends Path = Path>(routePath: P | P[], handler: RouteHandler<L, ExtractParams<P>>): void;
49
57
  /**
50
58
  * Adds a subrouter to the router
51
59
  *
52
60
  * @param routePath path of the router
53
61
  * @param embedRouter router to add at the path
54
62
  */
55
- use<P extends Path = Path>(routePath: P, embedRouter: EmbedRouter): void;
63
+ use<P extends Path = Path>(routePath: P, embedRouter: EmbedRouter<L>): void;
56
64
  /**
57
65
  * Must be attached to "interactionCreate" event for RouteButtonBuilder to work
58
66
  *
59
67
  * @param interaction interactions from "interactionCreate" (filter for ButtonInteractions)
60
68
  */
61
- listener(interaction: ButtonInteraction): Promise<void>;
69
+ listener(interaction: ButtonInteraction | AnySelectMenuInteraction, locals?: L): Promise<void>;
62
70
  /**
63
71
  * Connect or update an interaction message to a path
64
72
  *
@@ -66,11 +74,18 @@ declare class EmbedRouter {
66
74
  * @param path path to route the interaction to
67
75
  * @param flags optional discord flags to send with message (only allowed on first reply)
68
76
  */
69
- dispatch<P extends Path = Path>(interaction: Interaction, path: P, flags?: InteractionReplyOptions["flags"]): Promise<void>;
77
+ dispatch<P extends Path = Path>(interaction: Interaction, path: P, locals?: L, flags?: InteractionReplyOptions["flags"]): Promise<void>;
70
78
  private resolve;
71
79
  }
72
80
 
73
- declare class RouteButtonBuilder extends ButtonBuilder {
81
+ declare class RouteButtonBuilder<L> extends ButtonBuilder {
82
+ private embedRouter;
83
+ /**
84
+ *
85
+ * @param embedRouter the router you want to route with
86
+ * @param data the data to construct a component out of
87
+ */
88
+ constructor(embedRouter: EmbedRouter<L>, data?: Omit<Partial<APIButtonComponent>, "custom_id" | "url">);
74
89
  /**
75
90
  * Not supported for RouteButtonBuilder
76
91
  *
@@ -79,7 +94,7 @@ declare class RouteButtonBuilder extends ButtonBuilder {
79
94
  */
80
95
  setURL(): this;
81
96
  /**
82
- * Not supported for RouteButtonBuilder (setTo uses customId)
97
+ * Not supported for RouteButtonBuilder (use setTo)
83
98
  *
84
99
  * @remarks
85
100
  * @param
@@ -89,9 +104,135 @@ declare class RouteButtonBuilder extends ButtonBuilder {
89
104
  * Sets the path to route to when clicked
90
105
  *
91
106
  * @param path the path to route to
92
- * @param idPrefix the prefix to add before the custom_id
107
+ * @param query any query parameters you want to add
108
+ */
109
+ setTo<P extends Path>(path: P, query?: ConstructorParameters<typeof URLSearchParams>[0]): this;
110
+ }
111
+
112
+ declare class RouteStringSelectMenuOptionBuilder extends StringSelectMenuOptionBuilder {
113
+ /**
114
+ *
115
+ * @param data the data to construct a component out of
116
+ */
117
+ constructor(data?: Omit<SelectMenuComponentOptionData | APISelectMenuOption, "value"> & {
118
+ to: string;
119
+ });
120
+ /**
121
+ * Not supported for RouteStringSelectMenuOptionBuilder (use setTo)
122
+ *
123
+ * @remarks
124
+ * @param
125
+ */
126
+ setValue(): this;
127
+ /**
128
+ * Sets the path to route to when clicked
129
+ *
130
+ * @param path the path to route to
131
+ * @param query any query parameters you want to add
132
+ */
133
+ setTo<P extends Path>(path: P, query?: ConstructorParameters<typeof URLSearchParams>[0]): this;
134
+ }
135
+
136
+ declare class RouteStringSelectMenuBuilder<L, P extends Path> extends StringSelectMenuBuilder {
137
+ private embedRouter;
138
+ /**
139
+ *
140
+ * @param embedRouter the router you want to route with
141
+ * @param path the path to redirect to, :to or *to in path will be replaced with the selected user's id
142
+ * @param query any query parameters you want to add, :to will be replaced with the selected user's id
143
+ * @param data the data to construct a component out of
144
+ */
145
+ constructor(embedRouter: EmbedRouter<L>, path?: P | string, query?: ConstructorParameters<typeof URLSearchParams>[0], data?: Partial<StringSelectMenuComponentData | APIStringSelectComponent>);
146
+ /**
147
+ * Not supported for RouteStringSelectMenuBuilder (customId set from embedRouter)
148
+ *
149
+ * @remarks
150
+ * @param
151
+ */
152
+ setCustomId(): this;
153
+ /**
154
+ * Not supported for RouteStringSelectMenuBuilder (use addTos)
155
+ *
156
+ * @remarks
157
+ * @param
158
+ */
159
+ addOptions(): this;
160
+ /**
161
+ * Not supported for RouteStringSelectMenuBuilder (use setTos)
162
+ *
163
+ * @remarks
164
+ * @param
93
165
  */
94
- setTo<P extends Path>(embedRouter: EmbedRouter, path: P): void;
166
+ setOptions(): this;
167
+ /**
168
+ * Adds route select menu options to builder
169
+ *
170
+ * @param tos the list of route select menu options
171
+ */
172
+ addTos(...tos: RestOrArray<RouteStringSelectMenuOptionBuilder | ConstructorParameters<typeof RouteStringSelectMenuOptionBuilder>[0]>): this;
173
+ /**
174
+ * Sets route select menu options to builder
175
+ *
176
+ * @param tos the list of route select menu options
177
+ */
178
+ setTos(...tos: RestOrArray<RouteStringSelectMenuOptionBuilder | ConstructorParameters<typeof RouteStringSelectMenuOptionBuilder>[0]>): this;
179
+ }
180
+
181
+ declare class RouteChannelSelectMenuBuilder<L, P extends Path> extends ChannelSelectMenuBuilder {
182
+ private embedRouter;
183
+ /**
184
+ *
185
+ * @param embedRouter the router you want to route with
186
+ * @param path the path to redirect to, :channelId in path will be replaced with the selected user's id
187
+ * @param query any query parameters you want to add, :channelId will be replaced with the selected user's id
188
+ * @param data the data to construct a component out of
189
+ */
190
+ constructor(embedRouter: EmbedRouter<L>, path: P, query?: ConstructorParameters<typeof URLSearchParams>[0], data?: Partial<ChannelSelectMenuComponentData | APIChannelSelectComponent>);
191
+ /**
192
+ * Not supported for RouteChannelSelectMenuBuilder (customId set from embedRouter)
193
+ *
194
+ * @remarks
195
+ * @param
196
+ */
197
+ setCustomId(): this;
198
+ }
199
+
200
+ declare class RouteRoleSelectMenuBuilder<L, P extends Path> extends RoleSelectMenuBuilder {
201
+ private embedRouter;
202
+ /**
203
+ *
204
+ * @param embedRouter the router you want to route with
205
+ * @param path the path to redirect to, :roleId in path will be replaced with the selected user's id
206
+ * @param query any query parameters you want to add, :roleId will be replaced with the selected user's id
207
+ * @param data the data to construct a component out of
208
+ */
209
+ constructor(embedRouter: EmbedRouter<L>, path: P, query?: ConstructorParameters<typeof URLSearchParams>[0], data?: Partial<RoleSelectMenuComponentData | APIRoleSelectComponent>);
210
+ /**
211
+ * Not supported for RouteRoleSelectMenuBuilder (customId set from embedRouter)
212
+ *
213
+ * @remarks
214
+ * @param
215
+ */
216
+ setCustomId(): this;
217
+ }
218
+
219
+ declare class RouteUserSelectMenuBuilder<L, P extends Path> extends UserSelectMenuBuilder {
220
+ private embedRouter;
221
+ /**
222
+ *
223
+ * @param embedRouter the router you want to route with
224
+ * @param path the path to redirect to, :userId in path will be replaced with the selected user's id
225
+ * @param query any query parameters you want to add, :userId will be replaced with the selected user's id
226
+ * @param data the data to construct a component out of
227
+ */
228
+ constructor(embedRouter: EmbedRouter<L>, path: P, query?: ConstructorParameters<typeof URLSearchParams>[0], data?: Partial<UserSelectMenuComponentData | APIUserSelectComponent>);
229
+ /**
230
+ * Not supported for RouteUserSelectMenuBuilder (customId set from embedRouter)
231
+ *
232
+ * @remarks
233
+ * @param
234
+ */
235
+ setCustomId(): this;
95
236
  }
96
237
 
97
- export { type CompiledRoute, EmbedRouter, type ResolvedRoute, RouteButtonBuilder, type RouteHandler, type RouteResponse, type State };
238
+ export { type CompiledRoute, EmbedRouter, type ResolvedRoute, RouteButtonBuilder, RouteChannelSelectMenuBuilder, type RouteHandler, type RouteResponse, RouteRoleSelectMenuBuilder, RouteStringSelectMenuBuilder, RouteStringSelectMenuOptionBuilder, RouteUserSelectMenuBuilder, type State };
package/dist/index.d.ts CHANGED
@@ -1,19 +1,21 @@
1
1
  import { ParamData, Path, MatchFunction, MatchResult, TokenData } from 'path-to-regexp';
2
- import { Interaction, InteractionEditReplyOptions, ButtonInteraction, InteractionReplyOptions, ButtonBuilder } from 'discord.js';
2
+ import { Interaction, InteractionEditReplyOptions, ButtonInteraction, AnySelectMenuInteraction, InteractionReplyOptions, ButtonBuilder, APIButtonComponent, StringSelectMenuOptionBuilder, SelectMenuComponentOptionData, APISelectMenuOption, StringSelectMenuBuilder, StringSelectMenuComponentData, APIStringSelectComponent, RestOrArray, ChannelSelectMenuBuilder, ChannelSelectMenuComponentData, APIChannelSelectComponent, RoleSelectMenuBuilder, RoleSelectMenuComponentData, APIRoleSelectComponent, UserSelectMenuBuilder, UserSelectMenuComponentData, APIUserSelectComponent } from 'discord.js';
3
3
 
4
- type State<P extends ParamData> = MatchResult<P> & {
5
- searchParams: URLSearchParams;
4
+ type State<L, P extends ParamData = ParamData> = MatchResult<P> & {
5
+ embedRouter: EmbedRouter<L>;
6
+ locals?: L | undefined;
7
+ query: URLSearchParams;
6
8
  };
7
9
  type RouteResponse = InteractionEditReplyOptions;
8
- type RouteHandler<P extends ParamData> = (interaction: Interaction, state: State<P>) => RouteResponse;
9
- type CompiledRoute<P extends ParamData> = {
10
+ type RouteHandler<L, P extends ParamData = ParamData> = (interaction: Interaction, state: State<L, P>) => Promise<RouteResponse> | RouteResponse;
11
+ type CompiledRoute<L, P extends ParamData = ParamData> = {
10
12
  path: Path[];
11
13
  matchFunction: MatchFunction<P>;
12
- handler: RouteHandler<P>;
14
+ handler: RouteHandler<L, P>;
13
15
  };
14
- type ResolvedRoute<P extends ParamData> = {
15
- state: State<P>;
16
- handler: RouteHandler<P>;
16
+ type ResolvedRoute<L, P extends ParamData = ParamData> = {
17
+ state: State<L, P>;
18
+ handler: RouteHandler<L, P>;
17
19
  };
18
20
 
19
21
  type TakeIdentifier<T extends string, Name extends string = ""> = T extends `${infer Char}${infer Rest}` ? Char extends "/" | ":" | "*" | "{" | "}" ? [Name, T] : TakeIdentifier<Rest, `${Name}${Char}`> : [Name, T];
@@ -28,37 +30,43 @@ type ExtractParams<T extends string | TokenData, Depth extends string = ""> = T
28
30
  [K in Name]?: string;
29
31
  }) & ExtractParams<After, Depth> : ExtractParams<Rest, Depth> : Char extends "{" ? ExtractParams<Rest, `${Depth}1`> : Char extends "}" ? ExtractParams<Rest, Depth extends `1${infer Rest2}` ? Rest2 : Depth> : ExtractParams<Rest, Depth> : object : never;
30
32
 
31
- declare class EmbedRouter {
33
+ declare class EmbedRouter<L> {
32
34
  private static usedIdentifiers;
33
- private static generateUniqueIdentifier;
35
+ private name;
34
36
  private idPrefix;
37
+ private identifier;
35
38
  getIdPrefix(): string;
36
39
  private routes;
37
40
  /**
38
41
  *
42
+ * @param name the name to give the router. ensures buttons stay connected across restarts
39
43
  * @param idPrefix the prefix for RouteButtonBuilder customIds
40
44
  */
41
- constructor(idPrefix?: string);
45
+ constructor({ name, idPrefix, }?: {
46
+ name?: string;
47
+ idPrefix?: string;
48
+ });
49
+ private updateIdentifier;
42
50
  /**
43
51
  * Registers a path with the router
44
52
  *
45
53
  * @param routePath path to match with
46
54
  * @param handler function that generates the message when a path is matched
47
55
  */
48
- on<P extends Path = Path>(routePath: P | P[], handler: RouteHandler<ExtractParams<P>>): void;
56
+ get<P extends Path = Path>(routePath: P | P[], handler: RouteHandler<L, ExtractParams<P>>): void;
49
57
  /**
50
58
  * Adds a subrouter to the router
51
59
  *
52
60
  * @param routePath path of the router
53
61
  * @param embedRouter router to add at the path
54
62
  */
55
- use<P extends Path = Path>(routePath: P, embedRouter: EmbedRouter): void;
63
+ use<P extends Path = Path>(routePath: P, embedRouter: EmbedRouter<L>): void;
56
64
  /**
57
65
  * Must be attached to "interactionCreate" event for RouteButtonBuilder to work
58
66
  *
59
67
  * @param interaction interactions from "interactionCreate" (filter for ButtonInteractions)
60
68
  */
61
- listener(interaction: ButtonInteraction): Promise<void>;
69
+ listener(interaction: ButtonInteraction | AnySelectMenuInteraction, locals?: L): Promise<void>;
62
70
  /**
63
71
  * Connect or update an interaction message to a path
64
72
  *
@@ -66,11 +74,18 @@ declare class EmbedRouter {
66
74
  * @param path path to route the interaction to
67
75
  * @param flags optional discord flags to send with message (only allowed on first reply)
68
76
  */
69
- dispatch<P extends Path = Path>(interaction: Interaction, path: P, flags?: InteractionReplyOptions["flags"]): Promise<void>;
77
+ dispatch<P extends Path = Path>(interaction: Interaction, path: P, locals?: L, flags?: InteractionReplyOptions["flags"]): Promise<void>;
70
78
  private resolve;
71
79
  }
72
80
 
73
- declare class RouteButtonBuilder extends ButtonBuilder {
81
+ declare class RouteButtonBuilder<L> extends ButtonBuilder {
82
+ private embedRouter;
83
+ /**
84
+ *
85
+ * @param embedRouter the router you want to route with
86
+ * @param data the data to construct a component out of
87
+ */
88
+ constructor(embedRouter: EmbedRouter<L>, data?: Omit<Partial<APIButtonComponent>, "custom_id" | "url">);
74
89
  /**
75
90
  * Not supported for RouteButtonBuilder
76
91
  *
@@ -79,7 +94,7 @@ declare class RouteButtonBuilder extends ButtonBuilder {
79
94
  */
80
95
  setURL(): this;
81
96
  /**
82
- * Not supported for RouteButtonBuilder (setTo uses customId)
97
+ * Not supported for RouteButtonBuilder (use setTo)
83
98
  *
84
99
  * @remarks
85
100
  * @param
@@ -89,9 +104,135 @@ declare class RouteButtonBuilder extends ButtonBuilder {
89
104
  * Sets the path to route to when clicked
90
105
  *
91
106
  * @param path the path to route to
92
- * @param idPrefix the prefix to add before the custom_id
107
+ * @param query any query parameters you want to add
108
+ */
109
+ setTo<P extends Path>(path: P, query?: ConstructorParameters<typeof URLSearchParams>[0]): this;
110
+ }
111
+
112
+ declare class RouteStringSelectMenuOptionBuilder extends StringSelectMenuOptionBuilder {
113
+ /**
114
+ *
115
+ * @param data the data to construct a component out of
116
+ */
117
+ constructor(data?: Omit<SelectMenuComponentOptionData | APISelectMenuOption, "value"> & {
118
+ to: string;
119
+ });
120
+ /**
121
+ * Not supported for RouteStringSelectMenuOptionBuilder (use setTo)
122
+ *
123
+ * @remarks
124
+ * @param
125
+ */
126
+ setValue(): this;
127
+ /**
128
+ * Sets the path to route to when clicked
129
+ *
130
+ * @param path the path to route to
131
+ * @param query any query parameters you want to add
132
+ */
133
+ setTo<P extends Path>(path: P, query?: ConstructorParameters<typeof URLSearchParams>[0]): this;
134
+ }
135
+
136
+ declare class RouteStringSelectMenuBuilder<L, P extends Path> extends StringSelectMenuBuilder {
137
+ private embedRouter;
138
+ /**
139
+ *
140
+ * @param embedRouter the router you want to route with
141
+ * @param path the path to redirect to, :to or *to in path will be replaced with the selected user's id
142
+ * @param query any query parameters you want to add, :to will be replaced with the selected user's id
143
+ * @param data the data to construct a component out of
144
+ */
145
+ constructor(embedRouter: EmbedRouter<L>, path?: P | string, query?: ConstructorParameters<typeof URLSearchParams>[0], data?: Partial<StringSelectMenuComponentData | APIStringSelectComponent>);
146
+ /**
147
+ * Not supported for RouteStringSelectMenuBuilder (customId set from embedRouter)
148
+ *
149
+ * @remarks
150
+ * @param
151
+ */
152
+ setCustomId(): this;
153
+ /**
154
+ * Not supported for RouteStringSelectMenuBuilder (use addTos)
155
+ *
156
+ * @remarks
157
+ * @param
158
+ */
159
+ addOptions(): this;
160
+ /**
161
+ * Not supported for RouteStringSelectMenuBuilder (use setTos)
162
+ *
163
+ * @remarks
164
+ * @param
93
165
  */
94
- setTo<P extends Path>(embedRouter: EmbedRouter, path: P): void;
166
+ setOptions(): this;
167
+ /**
168
+ * Adds route select menu options to builder
169
+ *
170
+ * @param tos the list of route select menu options
171
+ */
172
+ addTos(...tos: RestOrArray<RouteStringSelectMenuOptionBuilder | ConstructorParameters<typeof RouteStringSelectMenuOptionBuilder>[0]>): this;
173
+ /**
174
+ * Sets route select menu options to builder
175
+ *
176
+ * @param tos the list of route select menu options
177
+ */
178
+ setTos(...tos: RestOrArray<RouteStringSelectMenuOptionBuilder | ConstructorParameters<typeof RouteStringSelectMenuOptionBuilder>[0]>): this;
179
+ }
180
+
181
+ declare class RouteChannelSelectMenuBuilder<L, P extends Path> extends ChannelSelectMenuBuilder {
182
+ private embedRouter;
183
+ /**
184
+ *
185
+ * @param embedRouter the router you want to route with
186
+ * @param path the path to redirect to, :channelId in path will be replaced with the selected user's id
187
+ * @param query any query parameters you want to add, :channelId will be replaced with the selected user's id
188
+ * @param data the data to construct a component out of
189
+ */
190
+ constructor(embedRouter: EmbedRouter<L>, path: P, query?: ConstructorParameters<typeof URLSearchParams>[0], data?: Partial<ChannelSelectMenuComponentData | APIChannelSelectComponent>);
191
+ /**
192
+ * Not supported for RouteChannelSelectMenuBuilder (customId set from embedRouter)
193
+ *
194
+ * @remarks
195
+ * @param
196
+ */
197
+ setCustomId(): this;
198
+ }
199
+
200
+ declare class RouteRoleSelectMenuBuilder<L, P extends Path> extends RoleSelectMenuBuilder {
201
+ private embedRouter;
202
+ /**
203
+ *
204
+ * @param embedRouter the router you want to route with
205
+ * @param path the path to redirect to, :roleId in path will be replaced with the selected user's id
206
+ * @param query any query parameters you want to add, :roleId will be replaced with the selected user's id
207
+ * @param data the data to construct a component out of
208
+ */
209
+ constructor(embedRouter: EmbedRouter<L>, path: P, query?: ConstructorParameters<typeof URLSearchParams>[0], data?: Partial<RoleSelectMenuComponentData | APIRoleSelectComponent>);
210
+ /**
211
+ * Not supported for RouteRoleSelectMenuBuilder (customId set from embedRouter)
212
+ *
213
+ * @remarks
214
+ * @param
215
+ */
216
+ setCustomId(): this;
217
+ }
218
+
219
+ declare class RouteUserSelectMenuBuilder<L, P extends Path> extends UserSelectMenuBuilder {
220
+ private embedRouter;
221
+ /**
222
+ *
223
+ * @param embedRouter the router you want to route with
224
+ * @param path the path to redirect to, :userId in path will be replaced with the selected user's id
225
+ * @param query any query parameters you want to add, :userId will be replaced with the selected user's id
226
+ * @param data the data to construct a component out of
227
+ */
228
+ constructor(embedRouter: EmbedRouter<L>, path: P, query?: ConstructorParameters<typeof URLSearchParams>[0], data?: Partial<UserSelectMenuComponentData | APIUserSelectComponent>);
229
+ /**
230
+ * Not supported for RouteUserSelectMenuBuilder (customId set from embedRouter)
231
+ *
232
+ * @remarks
233
+ * @param
234
+ */
235
+ setCustomId(): this;
95
236
  }
96
237
 
97
- export { type CompiledRoute, EmbedRouter, type ResolvedRoute, RouteButtonBuilder, type RouteHandler, type RouteResponse, type State };
238
+ export { type CompiledRoute, EmbedRouter, type ResolvedRoute, RouteButtonBuilder, RouteChannelSelectMenuBuilder, type RouteHandler, type RouteResponse, RouteRoleSelectMenuBuilder, RouteStringSelectMenuBuilder, RouteStringSelectMenuOptionBuilder, RouteUserSelectMenuBuilder, type State };