lunibee 0.2.2 → 0.2.4

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.
Files changed (70) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +225 -225
  3. package/dist/builders/attachment.d.ts +10 -2
  4. package/dist/builders/commands.d.ts +161 -101
  5. package/dist/builders/components.d.ts +54 -75
  6. package/dist/builders/embed.d.ts +68 -35
  7. package/dist/builders/index.d.ts +1 -1
  8. package/dist/builders/index.js +108 -133
  9. package/dist/builders/index.js.map +8 -8
  10. package/dist/collection/cache.d.ts +13 -6
  11. package/dist/collection/index.d.ts +90 -17
  12. package/dist/collection/index.js +442 -266
  13. package/dist/collection/index.js.map +4 -4
  14. package/dist/core/index.d.ts +9 -0
  15. package/dist/core/index.js +791 -436
  16. package/dist/core/index.js.map +47 -47
  17. package/dist/core/permissions.d.ts +9 -5
  18. package/dist/formatters/index.js +9 -5
  19. package/dist/formatters/index.js.map +3 -3
  20. package/dist/handlers/index.js +5 -10
  21. package/dist/handlers/index.js.map +3 -3
  22. package/dist/index.js +1010 -679
  23. package/dist/index.js.map +66 -65
  24. package/dist/managers/base.d.ts +26 -14
  25. package/dist/managers/emoji.d.ts +7 -1
  26. package/dist/managers/guild-resources.d.ts +11 -3
  27. package/dist/managers/guild.d.ts +13 -5
  28. package/dist/managers/index.d.ts +28 -14
  29. package/dist/managers/index.js +580 -340
  30. package/dist/managers/index.js.map +26 -26
  31. package/dist/managers/member.d.ts +5 -3
  32. package/dist/managers/message.d.ts +7 -3
  33. package/dist/managers/role.d.ts +13 -1
  34. package/dist/rest/error-codes.d.ts +48 -0
  35. package/dist/rest/errors.d.ts +14 -6
  36. package/dist/rest/index.d.ts +25 -12
  37. package/dist/rest/index.js +105 -18
  38. package/dist/rest/index.js.map +15 -14
  39. package/dist/rest/redis.d.ts +1 -1
  40. package/dist/rest/route.d.ts +8 -4
  41. package/dist/rest/routes.d.ts +102 -46
  42. package/dist/rest/transport.d.ts +10 -5
  43. package/dist/rest/webhook.d.ts +9 -5
  44. package/dist/sharding/bus.d.ts +34 -17
  45. package/dist/sharding/index.d.ts +34 -17
  46. package/dist/sharding/index.js +68 -36
  47. package/dist/sharding/index.js.map +17 -17
  48. package/dist/structures/base.d.ts +28 -10
  49. package/dist/structures/channels.d.ts +28 -14
  50. package/dist/structures/index.d.ts +6 -6
  51. package/dist/structures/index.js +81 -99
  52. package/dist/structures/index.js.map +19 -18
  53. package/dist/structures/interactions.d.ts +98 -50
  54. package/dist/structures/resources.d.ts +90 -46
  55. package/dist/types/gateway.d.ts +1 -1
  56. package/dist/types/index.d.ts +43 -18
  57. package/dist/types/index.js +20 -22
  58. package/dist/types/index.js.map +4 -4
  59. package/dist/utils/index.js.map +2 -2
  60. package/dist/voice/index.d.ts +12 -4
  61. package/dist/voice/index.js +17 -20
  62. package/dist/voice/index.js.map +3 -3
  63. package/dist/ws/decoder.d.ts +6 -2
  64. package/dist/ws/index.d.ts +25 -13
  65. package/dist/ws/index.js +63 -31
  66. package/dist/ws/index.js.map +14 -14
  67. package/dist/ws/protocol.d.ts +10 -2
  68. package/dist/ws/session.d.ts +14 -4
  69. package/dist/ws/state.d.ts +22 -11
  70. package/package.json +16 -15
@@ -17,106 +17,166 @@ export type ApplicationCommandOptionEnum = (typeof ApplicationCommandOptionEnum)
17
17
  /** Builds Discord application command payloads. */
18
18
  export declare class CreateSlashCommand {
19
19
  #private;
20
- /** Sets the command name. */ setName(name: string): this;
21
- /** Sets the command description. */ setDescription(description: string): this;
22
- /** Sets whether the command is available in direct messages. */ setDMPermission(enabled: boolean): this;
20
+ /** Sets the command name. */
21
+ setName(name: string): this;
22
+ /** Sets the command description. */
23
+ setDescription(description: string): this;
24
+ /** Sets where the command can be used: 0 guilds, 1 the bot's DMs, 2 other DMs. @throws {RangeError} For any other value. */
25
+ setContexts(...contexts: number[]): this;
26
+ /** @deprecated Discord deprecated `dm_permission`. Use {@link CreateSlashCommand.setContexts}: `setContexts(0)` for guilds only, `setContexts(0, 1)` to allow the bot's DMs. Removed in 0.3.0. */
27
+ setDMPermission(enabled: boolean): this;
23
28
  /** Sets whether the command is NSFW. */
24
29
  setNSFW(nsfw?: boolean): this;
25
30
  /** Sets whether the command is NSFW. */
26
31
  setNsfw(nsfw?: boolean): this;
27
- /** Sets command default member permissions. */ setDefaultMemberPermissions(permissions: bigint | number | string | null): this;
28
- /** Sets command integration types. */ setIntegrationTypes(...types: number[]): this;
29
- /** Adds a string option. */ addStringOption(configure: (option: CreateStringOption) => CreateStringOption): this;
30
- /** Adds an integer option. */ addIntegerOption(configure: (option: CreateIntegerOption) => CreateIntegerOption): this;
31
- /** Adds a number option. */ addNumberOption(configure: (option: CreateNumberOption) => CreateNumberOption): this;
32
- /** Adds a boolean option. */ addBooleanOption(configure: (option: CreateBooleanOption) => CreateBooleanOption): this;
33
- /** Adds a user option. */ addUserOption(configure: (option: CreateUserOption) => CreateUserOption): this;
34
- /** Adds a channel option. */ addChannelOption(configure: (option: CreateChannelOption) => CreateChannelOption): this;
35
- /** Adds a role option. */ addRoleOption(configure: (option: CreateRoleOption) => CreateRoleOption): this;
36
- /** Adds a mentionable option. */ addMentionableOption(configure: (option: CreateMentionableOption) => CreateMentionableOption): this;
37
- /** Adds an attachment option. */ addAttachmentOption(configure: (option: CreateAttachmentOption) => CreateAttachmentOption): this;
38
- /** Adds a subcommand. */ addSubcommand(configure: (option: CreateSubcommand) => CreateSubcommand): this;
39
- /** Adds a subcommand group. */ addSubcommandGroup(configure: (option: CreateSubcommandGroup) => CreateSubcommandGroup): this;
40
- /** Serializes the command payload. */ toJSON(): Record<string, unknown>;
41
- /** Adds a validated top-level command option. */ protected addOption(option: CreateCommandOption): this;
32
+ /** Sets command default member permissions. */
33
+ setDefaultMemberPermissions(permissions: bigint | number | string | null): this;
34
+ /** Sets command integration types. */
35
+ setIntegrationTypes(...types: number[]): this;
36
+ /** Adds a string option. */
37
+ addStringOption(configure: (option: CreateStringOption) => CreateStringOption): this;
38
+ /** Adds an integer option. */
39
+ addIntegerOption(configure: (option: CreateIntegerOption) => CreateIntegerOption): this;
40
+ /** Adds a number option. */
41
+ addNumberOption(configure: (option: CreateNumberOption) => CreateNumberOption): this;
42
+ /** Adds a boolean option. */
43
+ addBooleanOption(configure: (option: CreateBooleanOption) => CreateBooleanOption): this;
44
+ /** Adds a user option. */
45
+ addUserOption(configure: (option: CreateUserOption) => CreateUserOption): this;
46
+ /** Adds a channel option. */
47
+ addChannelOption(configure: (option: CreateChannelOption) => CreateChannelOption): this;
48
+ /** Adds a role option. */
49
+ addRoleOption(configure: (option: CreateRoleOption) => CreateRoleOption): this;
50
+ /** Adds a mentionable option. */
51
+ addMentionableOption(configure: (option: CreateMentionableOption) => CreateMentionableOption): this;
52
+ /** Adds an attachment option. */
53
+ addAttachmentOption(configure: (option: CreateAttachmentOption) => CreateAttachmentOption): this;
54
+ /** Adds a subcommand. */
55
+ addSubcommand(configure: (option: CreateSubcommand) => CreateSubcommand): this;
56
+ /** Adds a subcommand group. */
57
+ addSubcommandGroup(configure: (option: CreateSubcommandGroup) => CreateSubcommandGroup): this;
58
+ /** Serializes the command payload. */
59
+ toJSON(): Record<string, unknown>;
60
+ /** Adds a validated top-level command option. */
61
+ protected addOption(option: CreateCommandOption): this;
42
62
  }
43
63
  /** Base builder for command options. */
44
64
  export declare class CreateCommandOption {
45
65
  protected readonly data: Record<string, unknown>;
46
- /** Creates an option builder. */ constructor(type: number);
47
- /** Sets the option name. */ setName(name: string): this;
48
- /** Sets the option description. */ setDescription(description: string): this;
49
- /** Makes the option required or optional. */ setRequired(required?: boolean): this;
50
- /** Sets autocomplete. */ setAutocomplete(enabled?: boolean): this;
51
- /** Serializes the option payload. */ toJSON(): Record<string, unknown>;
66
+ /** Creates an option builder. */
67
+ constructor(type: number);
68
+ /** Sets the option name. */
69
+ setName(name: string): this;
70
+ /** Sets the option description. */
71
+ setDescription(description: string): this;
72
+ /** Makes the option required or optional. */
73
+ setRequired(required?: boolean): this;
74
+ /** Sets autocomplete. */
75
+ setAutocomplete(enabled?: boolean): this;
76
+ /** Serializes the option payload. */
77
+ toJSON(): Record<string, unknown>;
52
78
  }
53
79
  /** Builds a string command option. */
54
80
  export declare class CreateStringOption extends CreateCommandOption {
55
- /** Creates a string option. */ constructor();
56
- /** Adds string choices. */ addChoices(...choices: Array<{
81
+ /** Creates a string option. */
82
+ constructor();
83
+ /** Adds string choices. */
84
+ addChoices(...choices: Array<{
57
85
  name: string;
58
86
  value: string;
59
87
  }>): this;
60
- /** Sets the minimum string length. */ setMinLength(value: number): this;
61
- /** Sets the maximum string length. */ setMaxLength(value: number): this;
88
+ /** Sets the minimum string length. */
89
+ setMinLength(value: number): this;
90
+ /** Sets the maximum string length. */
91
+ setMaxLength(value: number): this;
62
92
  }
63
- /** Builds an integer command option. */
64
- export declare class CreateIntegerOption extends CreateCommandOption {
65
- constructor();
93
+ /** Shared bounds, choices and autocomplete rules of integer and number options. */
94
+ export declare class CreateNumericOption extends CreateCommandOption {
95
+ #private;
96
+ /** Creates a numeric option; `integer` rejects fractional bounds. */
97
+ constructor(type: number, integer: boolean);
98
+ /** Sets the minimum value. */
66
99
  setMinValue(value: number): this;
100
+ /** Sets the maximum value; it cannot be below the minimum. */
67
101
  setMaxValue(value: number): this;
102
+ /** Enables autocomplete; options with choices cannot use it. */
68
103
  setAutocomplete(enabled?: boolean): this;
104
+ /** Adds fixed choices. */
69
105
  addChoices(...choices: {
70
106
  name: string;
71
107
  value: number;
72
108
  }[]): this;
73
109
  }
110
+ /** Builds an integer command option. */
111
+ export declare class CreateIntegerOption extends CreateNumericOption {
112
+ constructor();
113
+ }
74
114
  /** Builds a number command option. */
75
- export declare class CreateNumberOption extends CreateCommandOption {
115
+ export declare class CreateNumberOption extends CreateNumericOption {
76
116
  constructor();
77
- setMinValue(value: number): this;
78
- setMaxValue(value: number): this;
79
- setAutocomplete(enabled?: boolean): this;
80
- addChoices(...choices: {
81
- name: string;
82
- value: number;
83
- }[]): this;
84
117
  }
85
- /** Builds a boolean command option. */ export declare class CreateBooleanOption extends CreateCommandOption {
86
- /** Creates a boolean option. */ constructor();
118
+ /** Builds a boolean command option. */
119
+ export declare class CreateBooleanOption extends CreateCommandOption {
120
+ /** Creates a boolean option. */
121
+ constructor();
87
122
  }
88
- /** Builds a user command option. */ export declare class CreateUserOption extends CreateCommandOption {
89
- /** Creates a user option. */ constructor();
123
+ /** Builds a user command option. */
124
+ export declare class CreateUserOption extends CreateCommandOption {
125
+ /** Creates a user option. */
126
+ constructor();
90
127
  }
91
- /** Builds a role command option. */ export declare class CreateRoleOption extends CreateCommandOption {
92
- /** Creates a role option. */ constructor();
128
+ /** Builds a role command option. */
129
+ export declare class CreateRoleOption extends CreateCommandOption {
130
+ /** Creates a role option. */
131
+ constructor();
93
132
  }
94
- /** Builds a mentionable command option. */ export declare class CreateMentionableOption extends CreateCommandOption {
95
- /** Creates a mentionable option. */ constructor();
133
+ /** Builds a mentionable command option. */
134
+ export declare class CreateMentionableOption extends CreateCommandOption {
135
+ /** Creates a mentionable option. */
136
+ constructor();
96
137
  }
97
- /** Builds an attachment command option. */ export declare class CreateAttachmentOption extends CreateCommandOption {
98
- /** Creates an attachment option. */ constructor();
138
+ /** Builds an attachment command option. */
139
+ export declare class CreateAttachmentOption extends CreateCommandOption {
140
+ /** Creates an attachment option. */
141
+ constructor();
99
142
  }
100
- /** Builds a channel command option. */ export declare class CreateChannelOption extends CreateCommandOption {
101
- /** Creates a channel option. */ constructor();
102
- /** Restricts accepted channel types. */ addChannelTypes(...types: number[]): this;
143
+ /** Builds a channel command option. */
144
+ export declare class CreateChannelOption extends CreateCommandOption {
145
+ /** Creates a channel option. */
146
+ constructor();
147
+ /** Restricts accepted channel types. */
148
+ addChannelTypes(...types: number[]): this;
103
149
  }
104
- /** Builds a nested subcommand. */ export declare class CreateSubcommand extends CreateCommandOption {
105
- /** Creates a subcommand. */ constructor();
106
- /** Adds a string option to this subcommand. */ addStringOption(configure: (option: CreateStringOption) => CreateStringOption): this;
107
- /** Adds an integer option to this subcommand. */ addIntegerOption(configure: (option: CreateIntegerOption) => CreateIntegerOption): this;
108
- /** Adds a number option to this subcommand. */ addNumberOption(configure: (option: CreateNumberOption) => CreateNumberOption): this;
109
- /** Adds a boolean option to this subcommand. */ addBooleanOption(configure: (option: CreateBooleanOption) => CreateBooleanOption): this;
110
- /** Adds a user option to this subcommand. */ addUserOption(configure: (option: CreateUserOption) => CreateUserOption): this;
111
- /** Adds a channel option to this subcommand. */ addChannelOption(configure: (option: CreateChannelOption) => CreateChannelOption): this;
112
- /** Adds a role option to this subcommand. */ addRoleOption(configure: (option: CreateRoleOption) => CreateRoleOption): this;
113
- /** Adds a mentionable option to this subcommand. */ addMentionableOption(configure: (option: CreateMentionableOption) => CreateMentionableOption): this;
114
- /** Adds an attachment option to this subcommand. */ addAttachmentOption(configure: (option: CreateAttachmentOption) => CreateAttachmentOption): this;
150
+ /** Builds a nested subcommand. */
151
+ export declare class CreateSubcommand extends CreateCommandOption {
152
+ /** Creates a subcommand. */
153
+ constructor();
154
+ /** Adds a string option to this subcommand. */
155
+ addStringOption(configure: (option: CreateStringOption) => CreateStringOption): this;
156
+ /** Adds an integer option to this subcommand. */
157
+ addIntegerOption(configure: (option: CreateIntegerOption) => CreateIntegerOption): this;
158
+ /** Adds a number option to this subcommand. */
159
+ addNumberOption(configure: (option: CreateNumberOption) => CreateNumberOption): this;
160
+ /** Adds a boolean option to this subcommand. */
161
+ addBooleanOption(configure: (option: CreateBooleanOption) => CreateBooleanOption): this;
162
+ /** Adds a user option to this subcommand. */
163
+ addUserOption(configure: (option: CreateUserOption) => CreateUserOption): this;
164
+ /** Adds a channel option to this subcommand. */
165
+ addChannelOption(configure: (option: CreateChannelOption) => CreateChannelOption): this;
166
+ /** Adds a role option to this subcommand. */
167
+ addRoleOption(configure: (option: CreateRoleOption) => CreateRoleOption): this;
168
+ /** Adds a mentionable option to this subcommand. */
169
+ addMentionableOption(configure: (option: CreateMentionableOption) => CreateMentionableOption): this;
170
+ /** Adds an attachment option to this subcommand. */
171
+ addAttachmentOption(configure: (option: CreateAttachmentOption) => CreateAttachmentOption): this;
115
172
  protected addChildOption(option: CreateCommandOption): this;
116
173
  }
117
- /** Builds a nested subcommand group. */ export declare class CreateSubcommandGroup extends CreateCommandOption {
118
- /** Creates a subcommand group. */ constructor();
119
- /** Adds a subcommand to this group. */ addSubcommand(configure: (option: CreateSubcommand) => CreateSubcommand): this;
174
+ /** Builds a nested subcommand group. */
175
+ export declare class CreateSubcommandGroup extends CreateCommandOption {
176
+ /** Creates a subcommand group. */
177
+ constructor();
178
+ /** Adds a subcommand to this group. */
179
+ addSubcommand(configure: (option: CreateSubcommand) => CreateSubcommand): this;
120
180
  }
121
181
  /** Builder for application commands that appear in right-click context menus.
122
182
  * Discord.js-familiar: `new CreateContextMenuCommand().setName("x").setType(2)`. */
@@ -136,7 +196,7 @@ export declare class CreateContextMenuCommand {
136
196
  setName(name: string): this;
137
197
  /** Sets default member permissions required to see this command. */
138
198
  setDefaultMemberPermissions(permissions: bigint | number | string | null): this;
139
- /** Sets whether the command is available in direct messages. */
199
+ /** @deprecated Discord deprecated `dm_permission`. Use {@link CreateContextMenuCommand.setContexts}: `setContexts(0)` for guilds only, `setContexts(0, 1)` to allow the bot's DMs. Removed in 0.3.0. */
140
200
  setDMPermission(enabled: boolean): this;
141
201
  /** Sets command integration types (0 guild install, 1 user install). */
142
202
  setIntegrationTypes(...types: number[]): this;
@@ -161,71 +221,71 @@ export declare class CreateUserCommand extends CreateContextMenuCommand {
161
221
  export declare class CreateMessageCommand extends CreateContextMenuCommand {
162
222
  constructor();
163
223
  }
164
- /** @deprecated Use {@link CreateAttachmentOption}. Removed in 2.0. */
224
+ /** @deprecated Use {@link CreateAttachmentOption}. Removed in 0.3.0. */
165
225
  export declare const AttachmentOptionBuilder: typeof CreateAttachmentOption;
166
- /** @deprecated Use {@link CreateAttachmentOption}. Removed in 2.0. */
226
+ /** @deprecated Use {@link CreateAttachmentOption}. Removed in 0.3.0. */
167
227
  export type AttachmentOptionBuilder = CreateAttachmentOption;
168
- /** @deprecated Use {@link CreateBooleanOption}. Removed in 2.0. */
228
+ /** @deprecated Use {@link CreateBooleanOption}. Removed in 0.3.0. */
169
229
  export declare const BooleanOptionBuilder: typeof CreateBooleanOption;
170
- /** @deprecated Use {@link CreateBooleanOption}. Removed in 2.0. */
230
+ /** @deprecated Use {@link CreateBooleanOption}. Removed in 0.3.0. */
171
231
  export type BooleanOptionBuilder = CreateBooleanOption;
172
- /** @deprecated Use {@link CreateChannelOption}. Removed in 2.0. */
232
+ /** @deprecated Use {@link CreateChannelOption}. Removed in 0.3.0. */
173
233
  export declare const ChannelOptionBuilder: typeof CreateChannelOption;
174
- /** @deprecated Use {@link CreateChannelOption}. Removed in 2.0. */
234
+ /** @deprecated Use {@link CreateChannelOption}. Removed in 0.3.0. */
175
235
  export type ChannelOptionBuilder = CreateChannelOption;
176
- /** @deprecated Use {@link CreateCommandOption}. Removed in 2.0. */
236
+ /** @deprecated Use {@link CreateCommandOption}. Removed in 0.3.0. */
177
237
  export declare const CommandOptionBuilder: typeof CreateCommandOption;
178
- /** @deprecated Use {@link CreateCommandOption}. Removed in 2.0. */
238
+ /** @deprecated Use {@link CreateCommandOption}. Removed in 0.3.0. */
179
239
  export type CommandOptionBuilder = CreateCommandOption;
180
- /** @deprecated Use {@link CreateContextMenuCommand}. Removed in 2.0. */
240
+ /** @deprecated Use {@link CreateContextMenuCommand}. Removed in 0.3.0. */
181
241
  export declare const ContextMenuCommandBuilder: typeof CreateContextMenuCommand;
182
- /** @deprecated Use {@link CreateContextMenuCommand}. Removed in 2.0. */
242
+ /** @deprecated Use {@link CreateContextMenuCommand}. Removed in 0.3.0. */
183
243
  export type ContextMenuCommandBuilder = CreateContextMenuCommand;
184
- /** @deprecated Use {@link CreateIntegerOption}. Removed in 2.0. */
244
+ /** @deprecated Use {@link CreateIntegerOption}. Removed in 0.3.0. */
185
245
  export declare const IntegerOptionBuilder: typeof CreateIntegerOption;
186
- /** @deprecated Use {@link CreateIntegerOption}. Removed in 2.0. */
246
+ /** @deprecated Use {@link CreateIntegerOption}. Removed in 0.3.0. */
187
247
  export type IntegerOptionBuilder = CreateIntegerOption;
188
- /** @deprecated Use {@link CreateMentionableOption}. Removed in 2.0. */
248
+ /** @deprecated Use {@link CreateMentionableOption}. Removed in 0.3.0. */
189
249
  export declare const MentionableOptionBuilder: typeof CreateMentionableOption;
190
- /** @deprecated Use {@link CreateMentionableOption}. Removed in 2.0. */
250
+ /** @deprecated Use {@link CreateMentionableOption}. Removed in 0.3.0. */
191
251
  export type MentionableOptionBuilder = CreateMentionableOption;
192
- /** @deprecated Use {@link CreateMessageCommand}. Removed in 2.0. */
252
+ /** @deprecated Use {@link CreateMessageCommand}. Removed in 0.3.0. */
193
253
  export declare const MessageCommandBuilder: typeof CreateMessageCommand;
194
- /** @deprecated Use {@link CreateMessageCommand}. Removed in 2.0. */
254
+ /** @deprecated Use {@link CreateMessageCommand}. Removed in 0.3.0. */
195
255
  export type MessageCommandBuilder = CreateMessageCommand;
196
- /** @deprecated Use {@link CreateNumberOption}. Removed in 2.0. */
256
+ /** @deprecated Use {@link CreateNumberOption}. Removed in 0.3.0. */
197
257
  export declare const NumberOptionBuilder: typeof CreateNumberOption;
198
- /** @deprecated Use {@link CreateNumberOption}. Removed in 2.0. */
258
+ /** @deprecated Use {@link CreateNumberOption}. Removed in 0.3.0. */
199
259
  export type NumberOptionBuilder = CreateNumberOption;
200
- /** @deprecated Use {@link CreateRoleOption}. Removed in 2.0. */
260
+ /** @deprecated Use {@link CreateRoleOption}. Removed in 0.3.0. */
201
261
  export declare const RoleOptionBuilder: typeof CreateRoleOption;
202
- /** @deprecated Use {@link CreateRoleOption}. Removed in 2.0. */
262
+ /** @deprecated Use {@link CreateRoleOption}. Removed in 0.3.0. */
203
263
  export type RoleOptionBuilder = CreateRoleOption;
204
- /** @deprecated Use {@link CreateSlashCommand}. Removed in 2.0. */
264
+ /** @deprecated Use {@link CreateSlashCommand}. Removed in 0.3.0. */
205
265
  export declare const SlashCommandBuilder: typeof CreateSlashCommand;
206
- /** @deprecated Use {@link CreateSlashCommand}. Removed in 2.0. */
266
+ /** @deprecated Use {@link CreateSlashCommand}. Removed in 0.3.0. */
207
267
  export type SlashCommandBuilder = CreateSlashCommand;
208
- /** @deprecated Use {@link CreateStringOption}. Removed in 2.0. */
268
+ /** @deprecated Use {@link CreateStringOption}. Removed in 0.3.0. */
209
269
  export declare const StringOptionBuilder: typeof CreateStringOption;
210
- /** @deprecated Use {@link CreateStringOption}. Removed in 2.0. */
270
+ /** @deprecated Use {@link CreateStringOption}. Removed in 0.3.0. */
211
271
  export type StringOptionBuilder = CreateStringOption;
212
- /** @deprecated Use {@link CreateSubcommand}. Removed in 2.0. */
272
+ /** @deprecated Use {@link CreateSubcommand}. Removed in 0.3.0. */
213
273
  export declare const SubcommandBuilder: typeof CreateSubcommand;
214
- /** @deprecated Use {@link CreateSubcommand}. Removed in 2.0. */
274
+ /** @deprecated Use {@link CreateSubcommand}. Removed in 0.3.0. */
215
275
  export type SubcommandBuilder = CreateSubcommand;
216
- /** @deprecated Use {@link CreateSubcommandGroup}. Removed in 2.0. */
276
+ /** @deprecated Use {@link CreateSubcommandGroup}. Removed in 0.3.0. */
217
277
  export declare const SubcommandGroupBuilder: typeof CreateSubcommandGroup;
218
- /** @deprecated Use {@link CreateSubcommandGroup}. Removed in 2.0. */
278
+ /** @deprecated Use {@link CreateSubcommandGroup}. Removed in 0.3.0. */
219
279
  export type SubcommandGroupBuilder = CreateSubcommandGroup;
220
- /** @deprecated Use {@link CreateUserCommand}. Removed in 2.0. */
280
+ /** @deprecated Use {@link CreateUserCommand}. Removed in 0.3.0. */
221
281
  export declare const UserCommandBuilder: typeof CreateUserCommand;
222
- /** @deprecated Use {@link CreateUserCommand}. Removed in 2.0. */
282
+ /** @deprecated Use {@link CreateUserCommand}. Removed in 0.3.0. */
223
283
  export type UserCommandBuilder = CreateUserCommand;
224
- /** @deprecated Use {@link CreateUserOption}. Removed in 2.0. */
284
+ /** @deprecated Use {@link CreateUserOption}. Removed in 0.3.0. */
225
285
  export declare const UserOptionBuilder: typeof CreateUserOption;
226
- /** @deprecated Use {@link CreateUserOption}. Removed in 2.0. */
286
+ /** @deprecated Use {@link CreateUserOption}. Removed in 0.3.0. */
227
287
  export type UserOptionBuilder = CreateUserOption;
228
- /** @deprecated Use {@link ApplicationCommandOptionEnum}. Removed in 2.0. */
288
+ /** @deprecated Use {@link ApplicationCommandOptionEnum}. Removed in 0.3.0. */
229
289
  export declare const ApplicationCommandOptionType: {
230
290
  readonly Subcommand: 1;
231
291
  readonly SubcommandGroup: 2;
@@ -239,5 +299,5 @@ export declare const ApplicationCommandOptionType: {
239
299
  readonly Number: 10;
240
300
  readonly Attachment: 11;
241
301
  };
242
- /** @deprecated Use {@link ApplicationCommandOptionEnum}. Removed in 2.0. */
302
+ /** @deprecated Use {@link ApplicationCommandOptionEnum}. Removed in 0.3.0. */
243
303
  export type ApplicationCommandOptionType = ApplicationCommandOptionEnum;
@@ -1,32 +1,11 @@
1
- import { ButtonType } from "@lunibee/types";
2
- export { ButtonType };
3
- /** Component type constants exposed by Lunibee. */
4
- export declare const ComponentEnum: {
5
- readonly ActionRow: 1;
6
- readonly Button: 2;
7
- readonly StringSelect: 3;
8
- readonly TextInput: 4;
9
- readonly UserSelect: 5;
10
- readonly RoleSelect: 6;
11
- readonly MentionableSelect: 7;
12
- readonly ChannelSelect: 8;
13
- readonly Section: 9;
14
- readonly TextDisplay: 10;
15
- readonly Thumbnail: 11;
16
- readonly MediaGallery: 12;
17
- readonly File: 13;
18
- readonly Separator: 14;
19
- readonly ContentInventoryEntry: 16;
20
- readonly Container: 17;
21
- };
1
+ import { ButtonType, ComponentEnum } from "@lunibee/types";
2
+ export { ButtonType, ComponentEnum };
22
3
  export declare const TextInputType: {
23
4
  readonly Short: 1;
24
5
  readonly Paragraph: 2;
25
6
  };
26
7
  /** One {@link TextInputType} value, usable as a type. */
27
8
  export type TextInputType = (typeof TextInputType)[keyof typeof TextInputType];
28
- /** One {@link ComponentEnum} value, usable as a type. */
29
- export type ComponentEnum = (typeof ComponentEnum)[keyof typeof ComponentEnum];
30
9
  export interface APIComponentEmoji {
31
10
  id?: string | null;
32
11
  name?: string | null;
@@ -157,14 +136,20 @@ export declare class CreateActionRow<T extends {
157
136
  clearComponents(): this;
158
137
  toJSON(): APIActionRowComponent;
159
138
  }
160
- export declare class CreateStringSelect {
139
+ /** Setters shared by string and entity select menus. */
140
+ export declare class CreateSelectMenu {
161
141
  #private;
142
+ protected constructor(data: APIStringSelectComponent | APIEntitySelectComponent);
162
143
  setCustomId(value: string): this;
163
144
  setPlaceholder(value: string): this;
164
145
  setMinValues(value: number): this;
165
146
  setMaxValues(value: number): this;
166
147
  setRequired(value?: boolean): this;
167
148
  setDisabled(value?: boolean): this;
149
+ }
150
+ export declare class CreateStringSelect extends CreateSelectMenu {
151
+ #private;
152
+ constructor();
168
153
  addOptions(...options: APISelectOption[]): this;
169
154
  toJSON(): APIStringSelectComponent;
170
155
  }
@@ -181,15 +166,9 @@ export declare class CreateButton {
181
166
  setDisabled(value?: boolean): this;
182
167
  toJSON(): APIButtonComponent;
183
168
  }
184
- export declare class CreateEntitySelect {
169
+ export declare class CreateEntitySelect extends CreateSelectMenu {
185
170
  #private;
186
171
  constructor(type: typeof ComponentEnum.UserSelect | typeof ComponentEnum.RoleSelect | typeof ComponentEnum.MentionableSelect | typeof ComponentEnum.ChannelSelect);
187
- setCustomId(value: string): this;
188
- setPlaceholder(value: string): this;
189
- setMinValues(value: number): this;
190
- setMaxValues(value: number): this;
191
- setRequired(value?: boolean): this;
192
- setDisabled(value?: boolean): this;
193
172
  setDefaultValues(...values: APISelectDefaultValue[]): this;
194
173
  toJSON(): APIEntitySelectComponent;
195
174
  }
@@ -310,87 +289,87 @@ export declare function componentsV2Message<T extends Record<string, unknown> =
310
289
  components: APIComponent[];
311
290
  flags: number;
312
291
  } & T;
313
- /** @deprecated Use {@link CreateButton}. Removed in 2.0. */
292
+ /** @deprecated Use {@link CreateButton}. Removed in 0.3.0. */
314
293
  export declare const ButtonBuilder: typeof CreateButton;
315
- /** @deprecated Use {@link CreateButton}. Removed in 2.0. */
294
+ /** @deprecated Use {@link CreateButton}. Removed in 0.3.0. */
316
295
  export type ButtonBuilder = CreateButton;
317
- /** @deprecated Use {@link CreateChannelSelectMenu}. Removed in 2.0. */
296
+ /** @deprecated Use {@link CreateChannelSelectMenu}. Removed in 0.3.0. */
318
297
  export declare const ChannelSelectMenuBuilder: typeof CreateChannelSelectMenu;
319
- /** @deprecated Use {@link CreateChannelSelectMenu}. Removed in 2.0. */
298
+ /** @deprecated Use {@link CreateChannelSelectMenu}. Removed in 0.3.0. */
320
299
  export type ChannelSelectMenuBuilder = CreateChannelSelectMenu;
321
- /** @deprecated Use {@link CreateContainer}. Removed in 2.0. */
300
+ /** @deprecated Use {@link CreateContainer}. Removed in 0.3.0. */
322
301
  export declare const ContainerBuilder: typeof CreateContainer;
323
- /** @deprecated Use {@link CreateContainer}. Removed in 2.0. */
302
+ /** @deprecated Use {@link CreateContainer}. Removed in 0.3.0. */
324
303
  export type ContainerBuilder = CreateContainer;
325
- /** @deprecated Use {@link CreateContentInventoryEntry}. Removed in 2.0. */
304
+ /** @deprecated Use {@link CreateContentInventoryEntry}. Removed in 0.3.0. */
326
305
  export declare const ContentInventoryEntryBuilder: typeof CreateContentInventoryEntry;
327
- /** @deprecated Use {@link CreateContentInventoryEntry}. Removed in 2.0. */
306
+ /** @deprecated Use {@link CreateContentInventoryEntry}. Removed in 0.3.0. */
328
307
  export type ContentInventoryEntryBuilder = CreateContentInventoryEntry;
329
- /** @deprecated Use {@link CreateEntitySelect}. Removed in 2.0. */
308
+ /** @deprecated Use {@link CreateEntitySelect}. Removed in 0.3.0. */
330
309
  export declare const EntitySelectBuilder: typeof CreateEntitySelect;
331
- /** @deprecated Use {@link CreateEntitySelect}. Removed in 2.0. */
310
+ /** @deprecated Use {@link CreateEntitySelect}. Removed in 0.3.0. */
332
311
  export type EntitySelectBuilder = CreateEntitySelect;
333
- /** @deprecated Use {@link CreateFileComponent}. Removed in 2.0. */
312
+ /** @deprecated Use {@link CreateFileComponent}. Removed in 0.3.0. */
334
313
  export declare const FileComponentBuilder: typeof CreateFileComponent;
335
- /** @deprecated Use {@link CreateFileComponent}. Removed in 2.0. */
314
+ /** @deprecated Use {@link CreateFileComponent}. Removed in 0.3.0. */
336
315
  export type FileComponentBuilder = CreateFileComponent;
337
- /** @deprecated Use {@link CreateMediaGallery}. Removed in 2.0. */
316
+ /** @deprecated Use {@link CreateMediaGallery}. Removed in 0.3.0. */
338
317
  export declare const MediaGalleryBuilder: typeof CreateMediaGallery;
339
- /** @deprecated Use {@link CreateMediaGallery}. Removed in 2.0. */
318
+ /** @deprecated Use {@link CreateMediaGallery}. Removed in 0.3.0. */
340
319
  export type MediaGalleryBuilder = CreateMediaGallery;
341
- /** @deprecated Use {@link CreateMentionableSelectMenu}. Removed in 2.0. */
320
+ /** @deprecated Use {@link CreateMentionableSelectMenu}. Removed in 0.3.0. */
342
321
  export declare const MentionableSelectMenuBuilder: typeof CreateMentionableSelectMenu;
343
- /** @deprecated Use {@link CreateMentionableSelectMenu}. Removed in 2.0. */
322
+ /** @deprecated Use {@link CreateMentionableSelectMenu}. Removed in 0.3.0. */
344
323
  export type MentionableSelectMenuBuilder = CreateMentionableSelectMenu;
345
- /** @deprecated Use {@link CreateModal}. Removed in 2.0. */
324
+ /** @deprecated Use {@link CreateModal}. Removed in 0.3.0. */
346
325
  export declare const ModalBuilder: typeof CreateModal;
347
- /** @deprecated Use {@link CreateModal}. Removed in 2.0. */
326
+ /** @deprecated Use {@link CreateModal}. Removed in 0.3.0. */
348
327
  export type ModalBuilder = CreateModal;
349
- /** @deprecated Use {@link CreateRoleSelectMenu}. Removed in 2.0. */
328
+ /** @deprecated Use {@link CreateRoleSelectMenu}. Removed in 0.3.0. */
350
329
  export declare const RoleSelectMenuBuilder: typeof CreateRoleSelectMenu;
351
- /** @deprecated Use {@link CreateRoleSelectMenu}. Removed in 2.0. */
330
+ /** @deprecated Use {@link CreateRoleSelectMenu}. Removed in 0.3.0. */
352
331
  export type RoleSelectMenuBuilder = CreateRoleSelectMenu;
353
- /** @deprecated Use {@link CreateSection}. Removed in 2.0. */
332
+ /** @deprecated Use {@link CreateSection}. Removed in 0.3.0. */
354
333
  export declare const SectionBuilder: typeof CreateSection;
355
- /** @deprecated Use {@link CreateSection}. Removed in 2.0. */
334
+ /** @deprecated Use {@link CreateSection}. Removed in 0.3.0. */
356
335
  export type SectionBuilder = CreateSection;
357
- /** @deprecated Use {@link CreateSeparator}. Removed in 2.0. */
336
+ /** @deprecated Use {@link CreateSeparator}. Removed in 0.3.0. */
358
337
  export declare const SeparatorBuilder: typeof CreateSeparator;
359
- /** @deprecated Use {@link CreateSeparator}. Removed in 2.0. */
338
+ /** @deprecated Use {@link CreateSeparator}. Removed in 0.3.0. */
360
339
  export type SeparatorBuilder = CreateSeparator;
361
- /** @deprecated Use {@link CreateStringSelect}. Removed in 2.0. */
340
+ /** @deprecated Use {@link CreateStringSelect}. Removed in 0.3.0. */
362
341
  export declare const StringSelectBuilder: typeof CreateStringSelect;
363
- /** @deprecated Use {@link CreateStringSelect}. Removed in 2.0. */
342
+ /** @deprecated Use {@link CreateStringSelect}. Removed in 0.3.0. */
364
343
  export type StringSelectBuilder = CreateStringSelect;
365
- /** @deprecated Use {@link CreateStringSelectMenu}. Removed in 2.0. */
344
+ /** @deprecated Use {@link CreateStringSelectMenu}. Removed in 0.3.0. */
366
345
  export declare const StringSelectMenuBuilder: typeof CreateStringSelect;
367
- /** @deprecated Use {@link CreateStringSelectMenu}. Removed in 2.0. */
346
+ /** @deprecated Use {@link CreateStringSelectMenu}. Removed in 0.3.0. */
368
347
  export type StringSelectMenuBuilder = CreateStringSelect;
369
- /** @deprecated Use {@link CreateTextDisplay}. Removed in 2.0. */
348
+ /** @deprecated Use {@link CreateTextDisplay}. Removed in 0.3.0. */
370
349
  export declare const TextDisplayBuilder: typeof CreateTextDisplay;
371
- /** @deprecated Use {@link CreateTextDisplay}. Removed in 2.0. */
350
+ /** @deprecated Use {@link CreateTextDisplay}. Removed in 0.3.0. */
372
351
  export type TextDisplayBuilder = CreateTextDisplay;
373
- /** @deprecated Use {@link CreateTextInput}. Removed in 2.0. */
352
+ /** @deprecated Use {@link CreateTextInput}. Removed in 0.3.0. */
374
353
  export declare const TextInputBuilder: typeof CreateTextInput;
375
- /** @deprecated Use {@link CreateTextInput}. Removed in 2.0. */
354
+ /** @deprecated Use {@link CreateTextInput}. Removed in 0.3.0. */
376
355
  export type TextInputBuilder = CreateTextInput;
377
- /** @deprecated Use {@link CreateThumbnail}. Removed in 2.0. */
356
+ /** @deprecated Use {@link CreateThumbnail}. Removed in 0.3.0. */
378
357
  export declare const ThumbnailBuilder: typeof CreateThumbnail;
379
- /** @deprecated Use {@link CreateThumbnail}. Removed in 2.0. */
358
+ /** @deprecated Use {@link CreateThumbnail}. Removed in 0.3.0. */
380
359
  export type ThumbnailBuilder = CreateThumbnail;
381
- /** @deprecated Use {@link CreateUserSelectMenu}. Removed in 2.0. */
360
+ /** @deprecated Use {@link CreateUserSelectMenu}. Removed in 0.3.0. */
382
361
  export declare const UserSelectMenuBuilder: typeof CreateUserSelectMenu;
383
- /** @deprecated Use {@link CreateUserSelectMenu}. Removed in 2.0. */
362
+ /** @deprecated Use {@link CreateUserSelectMenu}. Removed in 0.3.0. */
384
363
  export type UserSelectMenuBuilder = CreateUserSelectMenu;
385
- /** @deprecated Use {@link CreateActionRow}. Removed in 2.0. */
364
+ /** @deprecated Use {@link CreateActionRow}. Removed in 0.3.0. */
386
365
  export declare const ActionRowBuilder: typeof CreateActionRow;
387
- /** @deprecated Use {@link CreateActionRow}. Removed in 2.0. */
366
+ /** @deprecated Use {@link CreateActionRow}. Removed in 0.3.0. */
388
367
  export type ActionRowBuilder<T extends {
389
368
  toJSON(): APIActionRowChild;
390
369
  } = {
391
370
  toJSON(): APIActionRowChild;
392
371
  }> = CreateActionRow<T>;
393
- /** @deprecated Use {@link ButtonType}. Removed in 2.0. */
372
+ /** @deprecated Use {@link ButtonType}. Removed in 0.3.0. */
394
373
  export declare const ButtonStyle: {
395
374
  readonly Primary: 1;
396
375
  readonly Secondary: 2;
@@ -399,16 +378,16 @@ export declare const ButtonStyle: {
399
378
  readonly Link: 5;
400
379
  readonly Premium: 6;
401
380
  };
402
- /** @deprecated Use {@link ButtonType}. Removed in 2.0. */
381
+ /** @deprecated Use {@link ButtonType}. Removed in 0.3.0. */
403
382
  export type ButtonStyle = ButtonType;
404
- /** @deprecated Use {@link TextInputType}. Removed in 2.0. */
383
+ /** @deprecated Use {@link TextInputType}. Removed in 0.3.0. */
405
384
  export declare const TextInputStyle: {
406
385
  readonly Short: 1;
407
386
  readonly Paragraph: 2;
408
387
  };
409
- /** @deprecated Use {@link TextInputType}. Removed in 2.0. */
388
+ /** @deprecated Use {@link TextInputType}. Removed in 0.3.0. */
410
389
  export type TextInputStyle = TextInputType;
411
- /** @deprecated Use {@link ComponentEnum}. Removed in 2.0. */
390
+ /** @deprecated Use {@link ComponentEnum}. Removed in 0.3.0. */
412
391
  export declare const ComponentType: {
413
392
  readonly ActionRow: 1;
414
393
  readonly Button: 2;
@@ -427,5 +406,5 @@ export declare const ComponentType: {
427
406
  readonly ContentInventoryEntry: 16;
428
407
  readonly Container: 17;
429
408
  };
430
- /** @deprecated Use {@link ComponentEnum}. Removed in 2.0. */
409
+ /** @deprecated Use {@link ComponentEnum}. Removed in 0.3.0. */
431
410
  export type ComponentType = ComponentEnum;