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.
- package/LICENSE +21 -21
- package/README.md +225 -225
- package/dist/builders/attachment.d.ts +10 -2
- package/dist/builders/commands.d.ts +161 -101
- package/dist/builders/components.d.ts +54 -75
- package/dist/builders/embed.d.ts +68 -35
- package/dist/builders/index.d.ts +1 -1
- package/dist/builders/index.js +108 -133
- package/dist/builders/index.js.map +8 -8
- package/dist/collection/cache.d.ts +13 -6
- package/dist/collection/index.d.ts +90 -17
- package/dist/collection/index.js +442 -266
- package/dist/collection/index.js.map +4 -4
- package/dist/core/index.d.ts +9 -0
- package/dist/core/index.js +791 -436
- package/dist/core/index.js.map +47 -47
- package/dist/core/permissions.d.ts +9 -5
- package/dist/formatters/index.js +9 -5
- package/dist/formatters/index.js.map +3 -3
- package/dist/handlers/index.js +5 -10
- package/dist/handlers/index.js.map +3 -3
- package/dist/index.js +1010 -679
- package/dist/index.js.map +66 -65
- package/dist/managers/base.d.ts +26 -14
- package/dist/managers/emoji.d.ts +7 -1
- package/dist/managers/guild-resources.d.ts +11 -3
- package/dist/managers/guild.d.ts +13 -5
- package/dist/managers/index.d.ts +28 -14
- package/dist/managers/index.js +580 -340
- package/dist/managers/index.js.map +26 -26
- package/dist/managers/member.d.ts +5 -3
- package/dist/managers/message.d.ts +7 -3
- package/dist/managers/role.d.ts +13 -1
- package/dist/rest/error-codes.d.ts +48 -0
- package/dist/rest/errors.d.ts +14 -6
- package/dist/rest/index.d.ts +25 -12
- package/dist/rest/index.js +105 -18
- package/dist/rest/index.js.map +15 -14
- package/dist/rest/redis.d.ts +1 -1
- package/dist/rest/route.d.ts +8 -4
- package/dist/rest/routes.d.ts +102 -46
- package/dist/rest/transport.d.ts +10 -5
- package/dist/rest/webhook.d.ts +9 -5
- package/dist/sharding/bus.d.ts +34 -17
- package/dist/sharding/index.d.ts +34 -17
- package/dist/sharding/index.js +68 -36
- package/dist/sharding/index.js.map +17 -17
- package/dist/structures/base.d.ts +28 -10
- package/dist/structures/channels.d.ts +28 -14
- package/dist/structures/index.d.ts +6 -6
- package/dist/structures/index.js +81 -99
- package/dist/structures/index.js.map +19 -18
- package/dist/structures/interactions.d.ts +98 -50
- package/dist/structures/resources.d.ts +90 -46
- package/dist/types/gateway.d.ts +1 -1
- package/dist/types/index.d.ts +43 -18
- package/dist/types/index.js +20 -22
- package/dist/types/index.js.map +4 -4
- package/dist/utils/index.js.map +2 -2
- package/dist/voice/index.d.ts +12 -4
- package/dist/voice/index.js +17 -20
- package/dist/voice/index.js.map +3 -3
- package/dist/ws/decoder.d.ts +6 -2
- package/dist/ws/index.d.ts +25 -13
- package/dist/ws/index.js +63 -31
- package/dist/ws/index.js.map +14 -14
- package/dist/ws/protocol.d.ts +10 -2
- package/dist/ws/session.d.ts +14 -4
- package/dist/ws/state.d.ts +22 -11
- 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. */
|
|
21
|
-
|
|
22
|
-
/** Sets
|
|
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. */
|
|
28
|
-
|
|
29
|
-
/**
|
|
30
|
-
|
|
31
|
-
/** Adds a
|
|
32
|
-
|
|
33
|
-
/** Adds
|
|
34
|
-
|
|
35
|
-
/** Adds a
|
|
36
|
-
|
|
37
|
-
/** Adds
|
|
38
|
-
|
|
39
|
-
/** Adds a
|
|
40
|
-
|
|
41
|
-
/** Adds a
|
|
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. */
|
|
47
|
-
|
|
48
|
-
/** Sets the option
|
|
49
|
-
|
|
50
|
-
/** Sets
|
|
51
|
-
|
|
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. */
|
|
56
|
-
|
|
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. */
|
|
61
|
-
|
|
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
|
-
/**
|
|
64
|
-
export declare class
|
|
65
|
-
|
|
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
|
|
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. */
|
|
86
|
-
|
|
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. */
|
|
89
|
-
|
|
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. */
|
|
92
|
-
|
|
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. */
|
|
95
|
-
|
|
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. */
|
|
98
|
-
|
|
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. */
|
|
101
|
-
|
|
102
|
-
/**
|
|
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. */
|
|
105
|
-
|
|
106
|
-
/**
|
|
107
|
-
|
|
108
|
-
/** Adds a
|
|
109
|
-
|
|
110
|
-
/** Adds
|
|
111
|
-
|
|
112
|
-
/** Adds a
|
|
113
|
-
|
|
114
|
-
/** Adds
|
|
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. */
|
|
118
|
-
|
|
119
|
-
/**
|
|
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
|
-
/**
|
|
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
|
|
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
|
|
226
|
+
/** @deprecated Use {@link CreateAttachmentOption}. Removed in 0.3.0. */
|
|
167
227
|
export type AttachmentOptionBuilder = CreateAttachmentOption;
|
|
168
|
-
/** @deprecated Use {@link CreateBooleanOption}. Removed in
|
|
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
|
|
230
|
+
/** @deprecated Use {@link CreateBooleanOption}. Removed in 0.3.0. */
|
|
171
231
|
export type BooleanOptionBuilder = CreateBooleanOption;
|
|
172
|
-
/** @deprecated Use {@link CreateChannelOption}. Removed in
|
|
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
|
|
234
|
+
/** @deprecated Use {@link CreateChannelOption}. Removed in 0.3.0. */
|
|
175
235
|
export type ChannelOptionBuilder = CreateChannelOption;
|
|
176
|
-
/** @deprecated Use {@link CreateCommandOption}. Removed in
|
|
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
|
|
238
|
+
/** @deprecated Use {@link CreateCommandOption}. Removed in 0.3.0. */
|
|
179
239
|
export type CommandOptionBuilder = CreateCommandOption;
|
|
180
|
-
/** @deprecated Use {@link CreateContextMenuCommand}. Removed in
|
|
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
|
|
242
|
+
/** @deprecated Use {@link CreateContextMenuCommand}. Removed in 0.3.0. */
|
|
183
243
|
export type ContextMenuCommandBuilder = CreateContextMenuCommand;
|
|
184
|
-
/** @deprecated Use {@link CreateIntegerOption}. Removed in
|
|
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
|
|
246
|
+
/** @deprecated Use {@link CreateIntegerOption}. Removed in 0.3.0. */
|
|
187
247
|
export type IntegerOptionBuilder = CreateIntegerOption;
|
|
188
|
-
/** @deprecated Use {@link CreateMentionableOption}. Removed in
|
|
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
|
|
250
|
+
/** @deprecated Use {@link CreateMentionableOption}. Removed in 0.3.0. */
|
|
191
251
|
export type MentionableOptionBuilder = CreateMentionableOption;
|
|
192
|
-
/** @deprecated Use {@link CreateMessageCommand}. Removed in
|
|
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
|
|
254
|
+
/** @deprecated Use {@link CreateMessageCommand}. Removed in 0.3.0. */
|
|
195
255
|
export type MessageCommandBuilder = CreateMessageCommand;
|
|
196
|
-
/** @deprecated Use {@link CreateNumberOption}. Removed in
|
|
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
|
|
258
|
+
/** @deprecated Use {@link CreateNumberOption}. Removed in 0.3.0. */
|
|
199
259
|
export type NumberOptionBuilder = CreateNumberOption;
|
|
200
|
-
/** @deprecated Use {@link CreateRoleOption}. Removed in
|
|
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
|
|
262
|
+
/** @deprecated Use {@link CreateRoleOption}. Removed in 0.3.0. */
|
|
203
263
|
export type RoleOptionBuilder = CreateRoleOption;
|
|
204
|
-
/** @deprecated Use {@link CreateSlashCommand}. Removed in
|
|
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
|
|
266
|
+
/** @deprecated Use {@link CreateSlashCommand}. Removed in 0.3.0. */
|
|
207
267
|
export type SlashCommandBuilder = CreateSlashCommand;
|
|
208
|
-
/** @deprecated Use {@link CreateStringOption}. Removed in
|
|
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
|
|
270
|
+
/** @deprecated Use {@link CreateStringOption}. Removed in 0.3.0. */
|
|
211
271
|
export type StringOptionBuilder = CreateStringOption;
|
|
212
|
-
/** @deprecated Use {@link CreateSubcommand}. Removed in
|
|
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
|
|
274
|
+
/** @deprecated Use {@link CreateSubcommand}. Removed in 0.3.0. */
|
|
215
275
|
export type SubcommandBuilder = CreateSubcommand;
|
|
216
|
-
/** @deprecated Use {@link CreateSubcommandGroup}. Removed in
|
|
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
|
|
278
|
+
/** @deprecated Use {@link CreateSubcommandGroup}. Removed in 0.3.0. */
|
|
219
279
|
export type SubcommandGroupBuilder = CreateSubcommandGroup;
|
|
220
|
-
/** @deprecated Use {@link CreateUserCommand}. Removed in
|
|
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
|
|
282
|
+
/** @deprecated Use {@link CreateUserCommand}. Removed in 0.3.0. */
|
|
223
283
|
export type UserCommandBuilder = CreateUserCommand;
|
|
224
|
-
/** @deprecated Use {@link CreateUserOption}. Removed in
|
|
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
|
|
286
|
+
/** @deprecated Use {@link CreateUserOption}. Removed in 0.3.0. */
|
|
227
287
|
export type UserOptionBuilder = CreateUserOption;
|
|
228
|
-
/** @deprecated Use {@link ApplicationCommandOptionEnum}. Removed in
|
|
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
|
|
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
|
-
|
|
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
|
|
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
|
|
294
|
+
/** @deprecated Use {@link CreateButton}. Removed in 0.3.0. */
|
|
316
295
|
export type ButtonBuilder = CreateButton;
|
|
317
|
-
/** @deprecated Use {@link CreateChannelSelectMenu}. Removed in
|
|
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
|
|
298
|
+
/** @deprecated Use {@link CreateChannelSelectMenu}. Removed in 0.3.0. */
|
|
320
299
|
export type ChannelSelectMenuBuilder = CreateChannelSelectMenu;
|
|
321
|
-
/** @deprecated Use {@link CreateContainer}. Removed in
|
|
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
|
|
302
|
+
/** @deprecated Use {@link CreateContainer}. Removed in 0.3.0. */
|
|
324
303
|
export type ContainerBuilder = CreateContainer;
|
|
325
|
-
/** @deprecated Use {@link CreateContentInventoryEntry}. Removed in
|
|
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
|
|
306
|
+
/** @deprecated Use {@link CreateContentInventoryEntry}. Removed in 0.3.0. */
|
|
328
307
|
export type ContentInventoryEntryBuilder = CreateContentInventoryEntry;
|
|
329
|
-
/** @deprecated Use {@link CreateEntitySelect}. Removed in
|
|
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
|
|
310
|
+
/** @deprecated Use {@link CreateEntitySelect}. Removed in 0.3.0. */
|
|
332
311
|
export type EntitySelectBuilder = CreateEntitySelect;
|
|
333
|
-
/** @deprecated Use {@link CreateFileComponent}. Removed in
|
|
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
|
|
314
|
+
/** @deprecated Use {@link CreateFileComponent}. Removed in 0.3.0. */
|
|
336
315
|
export type FileComponentBuilder = CreateFileComponent;
|
|
337
|
-
/** @deprecated Use {@link CreateMediaGallery}. Removed in
|
|
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
|
|
318
|
+
/** @deprecated Use {@link CreateMediaGallery}. Removed in 0.3.0. */
|
|
340
319
|
export type MediaGalleryBuilder = CreateMediaGallery;
|
|
341
|
-
/** @deprecated Use {@link CreateMentionableSelectMenu}. Removed in
|
|
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
|
|
322
|
+
/** @deprecated Use {@link CreateMentionableSelectMenu}. Removed in 0.3.0. */
|
|
344
323
|
export type MentionableSelectMenuBuilder = CreateMentionableSelectMenu;
|
|
345
|
-
/** @deprecated Use {@link CreateModal}. Removed in
|
|
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
|
|
326
|
+
/** @deprecated Use {@link CreateModal}. Removed in 0.3.0. */
|
|
348
327
|
export type ModalBuilder = CreateModal;
|
|
349
|
-
/** @deprecated Use {@link CreateRoleSelectMenu}. Removed in
|
|
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
|
|
330
|
+
/** @deprecated Use {@link CreateRoleSelectMenu}. Removed in 0.3.0. */
|
|
352
331
|
export type RoleSelectMenuBuilder = CreateRoleSelectMenu;
|
|
353
|
-
/** @deprecated Use {@link CreateSection}. Removed in
|
|
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
|
|
334
|
+
/** @deprecated Use {@link CreateSection}. Removed in 0.3.0. */
|
|
356
335
|
export type SectionBuilder = CreateSection;
|
|
357
|
-
/** @deprecated Use {@link CreateSeparator}. Removed in
|
|
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
|
|
338
|
+
/** @deprecated Use {@link CreateSeparator}. Removed in 0.3.0. */
|
|
360
339
|
export type SeparatorBuilder = CreateSeparator;
|
|
361
|
-
/** @deprecated Use {@link CreateStringSelect}. Removed in
|
|
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
|
|
342
|
+
/** @deprecated Use {@link CreateStringSelect}. Removed in 0.3.0. */
|
|
364
343
|
export type StringSelectBuilder = CreateStringSelect;
|
|
365
|
-
/** @deprecated Use {@link CreateStringSelectMenu}. Removed in
|
|
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
|
|
346
|
+
/** @deprecated Use {@link CreateStringSelectMenu}. Removed in 0.3.0. */
|
|
368
347
|
export type StringSelectMenuBuilder = CreateStringSelect;
|
|
369
|
-
/** @deprecated Use {@link CreateTextDisplay}. Removed in
|
|
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
|
|
350
|
+
/** @deprecated Use {@link CreateTextDisplay}. Removed in 0.3.0. */
|
|
372
351
|
export type TextDisplayBuilder = CreateTextDisplay;
|
|
373
|
-
/** @deprecated Use {@link CreateTextInput}. Removed in
|
|
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
|
|
354
|
+
/** @deprecated Use {@link CreateTextInput}. Removed in 0.3.0. */
|
|
376
355
|
export type TextInputBuilder = CreateTextInput;
|
|
377
|
-
/** @deprecated Use {@link CreateThumbnail}. Removed in
|
|
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
|
|
358
|
+
/** @deprecated Use {@link CreateThumbnail}. Removed in 0.3.0. */
|
|
380
359
|
export type ThumbnailBuilder = CreateThumbnail;
|
|
381
|
-
/** @deprecated Use {@link CreateUserSelectMenu}. Removed in
|
|
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
|
|
362
|
+
/** @deprecated Use {@link CreateUserSelectMenu}. Removed in 0.3.0. */
|
|
384
363
|
export type UserSelectMenuBuilder = CreateUserSelectMenu;
|
|
385
|
-
/** @deprecated Use {@link CreateActionRow}. Removed in
|
|
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
|
|
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
|
|
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
|
|
381
|
+
/** @deprecated Use {@link ButtonType}. Removed in 0.3.0. */
|
|
403
382
|
export type ButtonStyle = ButtonType;
|
|
404
|
-
/** @deprecated Use {@link TextInputType}. Removed in
|
|
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
|
|
388
|
+
/** @deprecated Use {@link TextInputType}. Removed in 0.3.0. */
|
|
410
389
|
export type TextInputStyle = TextInputType;
|
|
411
|
-
/** @deprecated Use {@link ComponentEnum}. Removed in
|
|
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
|
|
409
|
+
/** @deprecated Use {@link ComponentEnum}. Removed in 0.3.0. */
|
|
431
410
|
export type ComponentType = ComponentEnum;
|