@magicyan/discord 1.3.1 → 1.4.1
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/dist/functions/{components.cjs → components/buttons.cjs} +0 -4
- package/dist/functions/components/buttons.mjs +8 -0
- package/dist/functions/components/components.cjs +28 -0
- package/dist/functions/components/components.mjs +26 -0
- package/dist/functions/components/container.cjs +63 -0
- package/dist/functions/components/container.mjs +61 -0
- package/dist/functions/components/file.cjs +17 -0
- package/dist/functions/components/file.mjs +15 -0
- package/dist/functions/components/gallery.cjs +26 -0
- package/dist/functions/components/gallery.mjs +24 -0
- package/dist/functions/components/row.cjs +9 -0
- package/dist/functions/components/row.mjs +7 -0
- package/dist/functions/components/section.cjs +29 -0
- package/dist/functions/components/section.mjs +27 -0
- package/dist/functions/components/separator.cjs +12 -0
- package/dist/functions/components/separator.mjs +10 -0
- package/dist/functions/components/text.cjs +12 -0
- package/dist/functions/components/text.mjs +10 -0
- package/dist/functions/components/thumbnail.cjs +16 -0
- package/dist/functions/components/thumbnail.mjs +14 -0
- package/dist/functions/embeds/embedplus.cjs +11 -15
- package/dist/functions/embeds/embedplus.mjs +11 -15
- package/dist/functions/embeds/footer.cjs +3 -0
- package/dist/functions/embeds/footer.mjs +3 -0
- package/dist/functions/modals.cjs +4 -7
- package/dist/functions/modals.mjs +3 -6
- package/dist/guards/attachment.cjs +9 -0
- package/dist/guards/attachment.mjs +7 -0
- package/dist/guards/selectmenu.cjs +9 -0
- package/dist/guards/selectmenu.mjs +7 -0
- package/dist/index.cjs +24 -3
- package/dist/index.d.cts +293 -7
- package/dist/index.d.mts +293 -7
- package/dist/index.d.ts +293 -7
- package/dist/index.mjs +12 -1
- package/package.json +3 -3
- package/dist/functions/components.mjs +0 -11
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as discord_js from 'discord.js';
|
|
2
|
-
import { GatewayIntentBits, Partials, Attachment, AttachmentBuilder, EmbedAssetData, Guild, GuildMember, User, ClientUser, ImageURLOptions, EmbedFooterData, ColorResolvable, APIEmbed, Embed, EmbedData, EmbedBuilder, AttachmentData, AnyComponentBuilder, ActionRowBuilder,
|
|
2
|
+
import { GatewayIntentBits, Partials, Attachment, AttachmentBuilder, EmbedAssetData, Guild, GuildMember, User, ClientUser, ImageURLOptions, EmbedFooterData, ColorResolvable, APIEmbed, Embed, EmbedData, EmbedBuilder, AttachmentData, ButtonBuilder, LinkButtonComponentData, AnyComponentBuilder, ActionRowBuilder, FileBuilder, APIUnfurledMediaItem, MediaGalleryBuilder, MediaGalleryItemData, SeparatorBuilder, ThumbnailComponentData, ThumbnailBuilder, SectionBuilder, TextDisplayBuilder, MessageActionRowComponentBuilder, ContainerBuilder, Colors, ContainerComponentData, RGBTuple, ChannelType, CommandInteractionOption, Client, ApplicationCommand, TextInputBuilder, ModalSubmitInteraction, ModalSubmitFields, Collection, TextInputComponent, TextInputStyle, TextInputComponentData, GuildEmoji, GuildTextBasedChannel, Message, Role, WebhookClientOptions, WebhookClient, WebhookClientData, StringSelectMenuBuilder, UserSelectMenuBuilder, RoleSelectMenuBuilder, ChannelSelectMenuBuilder, MentionableSelectMenuBuilder } from 'discord.js';
|
|
3
|
+
import * as _discordjs_builders from '/home/rinckodev/projects/npm/magicyan/node_modules/@discordjs/builders/dist/index.d.ts';
|
|
3
4
|
export * from '@magicyan/core';
|
|
4
5
|
|
|
5
6
|
declare const chars: {
|
|
@@ -112,7 +113,7 @@ type EmbedPlusFooterData = {
|
|
|
112
113
|
text?: string | null;
|
|
113
114
|
iconURL?: string | null;
|
|
114
115
|
};
|
|
115
|
-
declare function createEmbedFooter(options: EmbedPlusFooterData): EmbedFooterData | undefined;
|
|
116
|
+
declare function createEmbedFooter(options: string | EmbedPlusFooterData): EmbedFooterData | undefined;
|
|
116
117
|
|
|
117
118
|
type EmbedPlusBuilderReturn<B> = undefined extends B ? EmbedPlusBuilder : false extends B ? EmbedPlusBuilder : EmbedPlusBuilder[];
|
|
118
119
|
type EmbedPlusColorData = string & {} | ColorResolvable | null;
|
|
@@ -121,18 +122,19 @@ type EmbedPlusAuthorData = {
|
|
|
121
122
|
url?: string;
|
|
122
123
|
iconURL?: string;
|
|
123
124
|
};
|
|
125
|
+
type MaybeString = string | null | undefined;
|
|
124
126
|
interface EmbedPlusData {
|
|
125
127
|
title?: string | null;
|
|
126
128
|
color?: EmbedPlusColorData | null;
|
|
127
|
-
description?:
|
|
129
|
+
description?: MaybeString | MaybeString[];
|
|
128
130
|
url?: string | null | {
|
|
129
131
|
toString(): string;
|
|
130
132
|
};
|
|
131
133
|
thumbnail?: EmbedPlusAssetData;
|
|
132
134
|
image?: EmbedPlusAssetData;
|
|
133
135
|
fields?: Partial<EmbedPlusFieldData>[] | null;
|
|
134
|
-
timestamp?: string | number | Date | null;
|
|
135
|
-
footer?: EmbedPlusFooterData;
|
|
136
|
+
timestamp?: string | number | Date | null | boolean;
|
|
137
|
+
footer?: EmbedPlusFooterData | string;
|
|
136
138
|
author?: EmbedPlusAuthorData;
|
|
137
139
|
}
|
|
138
140
|
type AnyEmbedData = APIEmbed | Embed | EmbedData;
|
|
@@ -178,11 +180,289 @@ interface CreateEmbedFilesOptions {
|
|
|
178
180
|
*/
|
|
179
181
|
declare function createEmbedFiles(embed: EmbedBuilder, options?: CreateEmbedFilesOptions): AttachmentBuilder[];
|
|
180
182
|
|
|
181
|
-
declare function createRow<Component extends AnyComponentBuilder>(...components: Component[]): ActionRowBuilder<Component>;
|
|
182
183
|
interface CreateLinkButtonData extends Omit<LinkButtonComponentData, "style" | "type"> {
|
|
183
184
|
}
|
|
184
185
|
declare function createLinkButton(data: CreateLinkButtonData): ButtonBuilder;
|
|
185
186
|
|
|
187
|
+
declare function createRow<Component extends AnyComponentBuilder>(...components: Component[]): ActionRowBuilder<Component>;
|
|
188
|
+
|
|
189
|
+
type FileSource = string | Attachment | AttachmentBuilder;
|
|
190
|
+
interface CreateFileOptions extends Omit<APIUnfurledMediaItem, "url"> {
|
|
191
|
+
spoiler?: boolean;
|
|
192
|
+
}
|
|
193
|
+
/**
|
|
194
|
+
* Creates a {@link FileBuilder} from an {@link AttachmentBuilder} or an attachment reference string.
|
|
195
|
+
*
|
|
196
|
+
* If the `source` is an {@link AttachmentBuilder}, it automatically prefixes the file name with `"attachment://"`.
|
|
197
|
+
* If the `source` is a string, it must already be a valid attachment reference in the format `"attachment://filename.ext"`.
|
|
198
|
+
*
|
|
199
|
+
* You can optionally provide file metadata through the `options` parameter, such as dimensions
|
|
200
|
+
* or whether the file should be marked as a spoiler.
|
|
201
|
+
*
|
|
202
|
+
* @param source - The source of the file. Must be an {@link AttachmentBuilder} or an attachment reference string.
|
|
203
|
+
* @param options - Optional metadata for the file, such as `width`, `height`, `spoiler`, and `size`.
|
|
204
|
+
*
|
|
205
|
+
* @returns A {@link FileBuilder} ready to be used inside a message component.
|
|
206
|
+
*
|
|
207
|
+
* @example
|
|
208
|
+
* // Creating a file from an AttachmentBuilder
|
|
209
|
+
* const attachmentBuilder = new AttachmentBuilder("path/to/image.png");
|
|
210
|
+
* const file = createFile(attachmentBuilder);
|
|
211
|
+
*
|
|
212
|
+
* @example
|
|
213
|
+
* // Creating a file from an attachment reference string
|
|
214
|
+
* const file = createFile("attachment://image.png");
|
|
215
|
+
*
|
|
216
|
+
* @example
|
|
217
|
+
* // Creating a file with additional options like marking it as a spoiler
|
|
218
|
+
* const file = createFile("attachment://secret.png", { spoiler: true });
|
|
219
|
+
*/
|
|
220
|
+
declare function createFile(source: FileSource, options?: CreateFileOptions): FileBuilder;
|
|
221
|
+
|
|
222
|
+
type MediaGallerySource = MediaGalleryItemData | string | Attachment | AttachmentBuilder;
|
|
223
|
+
/**
|
|
224
|
+
* Creates a {@link MediaGalleryBuilder} instance with a collection of media items, which can be images, attachments, or URLs.
|
|
225
|
+
*
|
|
226
|
+
* This function allows you to add multiple media items to a gallery, where each item can be a URL,
|
|
227
|
+
* an {@link Attachment}, or an {@link AttachmentBuilder}. It processes each item and adds it to the gallery,
|
|
228
|
+
* converting it into the appropriate format for rendering.
|
|
229
|
+
*
|
|
230
|
+
* **Parameters:**
|
|
231
|
+
* - `items`: An array of media items to be added to the gallery. Each item can be:
|
|
232
|
+
* - A {@link MediaGalleryItemData} object, which includes media information such as URLs.
|
|
233
|
+
* - A string URL pointing to an external resource (e.g., an image URL).
|
|
234
|
+
* - An {@link Attachment} or {@link AttachmentBuilder}, which are Discord attachments.
|
|
235
|
+
*
|
|
236
|
+
* @param items - The media items to be added to the gallery. Each item is processed and converted into a format suitable for the gallery.
|
|
237
|
+
*
|
|
238
|
+
* @returns A {@link MediaGalleryBuilder} instance populated with the specified media items.
|
|
239
|
+
*
|
|
240
|
+
* @example
|
|
241
|
+
* // Creating a media gallery with URLs and an attachment
|
|
242
|
+
* const gallery = createMediaGallery(
|
|
243
|
+
* "https://example.com/image1.png",
|
|
244
|
+
* new AttachmentBuilder("image2.png", { name: "image2.png" }),
|
|
245
|
+
* { media: { url: "https://example.com/image3.png" } }
|
|
246
|
+
* );
|
|
247
|
+
*
|
|
248
|
+
* @example
|
|
249
|
+
* // Creating a media gallery with only attachments
|
|
250
|
+
* const gallery = createMediaGallery(
|
|
251
|
+
* new AttachmentBuilder("file1.png", { name: "file1.png" }),
|
|
252
|
+
* new AttachmentBuilder("file2.png", { name: "file2.png" })
|
|
253
|
+
* );
|
|
254
|
+
*
|
|
255
|
+
* @example
|
|
256
|
+
* // Creating a media gallery with mixed media types (URL and attachment)
|
|
257
|
+
* const gallery = createMediaGallery(
|
|
258
|
+
* "https://example.com/image1.png",
|
|
259
|
+
* new AttachmentBuilder("image2.png", { name: "image2.png" })
|
|
260
|
+
* );
|
|
261
|
+
*
|
|
262
|
+
*/
|
|
263
|
+
declare function createMediaGallery(...items: MediaGallerySource[]): MediaGalleryBuilder;
|
|
264
|
+
|
|
265
|
+
interface SeparatorData {
|
|
266
|
+
divider?: boolean;
|
|
267
|
+
large?: boolean;
|
|
268
|
+
}
|
|
269
|
+
/**
|
|
270
|
+
* Creates a {@link SeparatorBuilder} component with customizable options for visibility and spacing.
|
|
271
|
+
*
|
|
272
|
+
* This function generates a separator that can be configured to either be visible or disabled,
|
|
273
|
+
* and can have either small or large spacing between components. The default settings are for a
|
|
274
|
+
* visible separator with small spacing.
|
|
275
|
+
*
|
|
276
|
+
* **Parameters:**
|
|
277
|
+
* - `divider` (optional): If `false`, the separator divider will be disabled and won't be rendered. Default is `true`.
|
|
278
|
+
* - `large` (optional): If `true`, the separator will have a large spacing. Default is `false` (small spacing).
|
|
279
|
+
*
|
|
280
|
+
* @param data - An object containing the optional properties `divider` and `large` to configure the separator.
|
|
281
|
+
*
|
|
282
|
+
* @returns A {@link SeparatorBuilder} instance with the specified configuration.
|
|
283
|
+
*
|
|
284
|
+
* @example
|
|
285
|
+
* // Creating a separator with default settings (visible and small spacing)
|
|
286
|
+
* const separator = createSeparator();
|
|
287
|
+
*
|
|
288
|
+
* @example
|
|
289
|
+
* // Creating a disabled separator divider (not visible)
|
|
290
|
+
* const separator = createSeparator({ divider: false });
|
|
291
|
+
*
|
|
292
|
+
* @example
|
|
293
|
+
* // Creating a separator with large spacing
|
|
294
|
+
* const separator = createSeparator({ large: true });
|
|
295
|
+
*/
|
|
296
|
+
declare function createSeparator(data?: SeparatorData): SeparatorBuilder;
|
|
297
|
+
|
|
298
|
+
type ThumbnailData = Partial<Omit<ThumbnailComponentData, "type">> | Attachment | AttachmentBuilder | string;
|
|
299
|
+
/**
|
|
300
|
+
* Creates a {@link ThumbnailBuilder} from a URL, an attachment, or partial thumbnail data.
|
|
301
|
+
*
|
|
302
|
+
* This function helps create a thumbnail component for a container.
|
|
303
|
+
* It supports different input formats, such as a direct URL string,
|
|
304
|
+
* an {@link AttachmentBuilder}, an {@link Attachment}, or a partial {@link ThumbnailComponentData}.
|
|
305
|
+
*
|
|
306
|
+
* **Important:**
|
|
307
|
+
* - If providing a string, it must either be a valid URL or a reference to an attachment using the `attachment://filename.ext` format.
|
|
308
|
+
*
|
|
309
|
+
* @param data - The thumbnail source: a URL, an attachment builder, an attachment, or partial thumbnail data.
|
|
310
|
+
*
|
|
311
|
+
* @returns A {@link ThumbnailBuilder} instance populated with the provided data.
|
|
312
|
+
*
|
|
313
|
+
* @example
|
|
314
|
+
* // Creating a thumbnail from a URL
|
|
315
|
+
* const thumbnail = createThumbnail("https://example.com/image.png");
|
|
316
|
+
*
|
|
317
|
+
* @example
|
|
318
|
+
* // Creating a thumbnail from partial data
|
|
319
|
+
* const thumbnail = createThumbnail({
|
|
320
|
+
* media: { url: "attachment://image.png" },
|
|
321
|
+
* spoiler: true
|
|
322
|
+
* });
|
|
323
|
+
*/
|
|
324
|
+
declare function createThumbnail(data: ThumbnailData): ThumbnailBuilder;
|
|
325
|
+
|
|
326
|
+
type SectionAcessoryData = {
|
|
327
|
+
button?: never;
|
|
328
|
+
thumbnail: ThumbnailData;
|
|
329
|
+
} | {
|
|
330
|
+
button: ButtonBuilder;
|
|
331
|
+
thumbnail?: never;
|
|
332
|
+
};
|
|
333
|
+
type SectionData = SectionAcessoryData & {
|
|
334
|
+
content: string | string[];
|
|
335
|
+
};
|
|
336
|
+
/**
|
|
337
|
+
* Creates a {@link SectionBuilder} component with customizable content, thumbnail, and optional button.
|
|
338
|
+
*
|
|
339
|
+
* This function generates a section that can either have a button, a thumbnail, or both as accessories,
|
|
340
|
+
* along with the provided content. The content can be a single string or an array of strings.
|
|
341
|
+
* If both a button and a thumbnail are provided, only one can be set, as specified in the types.
|
|
342
|
+
*
|
|
343
|
+
* **Parameters:**
|
|
344
|
+
* - `content`: The main content of the section. This can either be a single string or an array of strings to be displayed.
|
|
345
|
+
* - `button` (optional): A {@link ButtonBuilder} instance to be added as a button accessory. If provided, no thumbnail can be set.
|
|
346
|
+
* - `thumbnail` (optional): A {@link ThumbnailData} object to set as the thumbnail accessory. If provided, no button can be set.
|
|
347
|
+
*
|
|
348
|
+
* @param data - An object containing the properties `content`, `button`, and `thumbnail` for configuring the section.
|
|
349
|
+
*
|
|
350
|
+
* @returns A {@link SectionBuilder} instance with the specified configuration.
|
|
351
|
+
*
|
|
352
|
+
* @example
|
|
353
|
+
* // Creating a section with a success button
|
|
354
|
+
* const section = createSection({
|
|
355
|
+
* content: "Welcome to the section!",
|
|
356
|
+
* button: new ButtonBuilder({
|
|
357
|
+
* customId: "welcome/button",
|
|
358
|
+
* label: "Click Me",
|
|
359
|
+
* style: ButtonStyle.Success,
|
|
360
|
+
* }),
|
|
361
|
+
* });
|
|
362
|
+
*
|
|
363
|
+
* @example
|
|
364
|
+
* // Creating a section with a thumbnail and content
|
|
365
|
+
* const section = createSection({
|
|
366
|
+
* content: "This is a section with a thumbnail.",
|
|
367
|
+
* thumbnail: "https://example.com/image.png"
|
|
368
|
+
* });
|
|
369
|
+
*
|
|
370
|
+
* @example
|
|
371
|
+
* // Creating a section with an array of content strings and a thumbnail
|
|
372
|
+
* const section = createSection({
|
|
373
|
+
* content: ["Line 1", "Line 2", "Line 3"],
|
|
374
|
+
* thumbnail: "https://example.com/image.png"
|
|
375
|
+
* });
|
|
376
|
+
*/
|
|
377
|
+
declare function createSection(data: SectionData): SectionBuilder;
|
|
378
|
+
|
|
379
|
+
/**
|
|
380
|
+
* Creates a {@link TextDisplayBuilder} with the given content and optional ID.
|
|
381
|
+
*
|
|
382
|
+
* This function simplifies the creation of text display components for a container,
|
|
383
|
+
* allowing you to set the text content and optionally assign a custom ID.
|
|
384
|
+
*
|
|
385
|
+
* @param content - The text content to display.
|
|
386
|
+
* @param id - An optional numeric ID for the text component.
|
|
387
|
+
*
|
|
388
|
+
* @returns A new {@link TextDisplayBuilder} instance containing the provided content and ID.
|
|
389
|
+
*
|
|
390
|
+
* @example
|
|
391
|
+
* // Creating a simple text display component
|
|
392
|
+
* const textDisplay = createTextDisplay("Hello World!");
|
|
393
|
+
*
|
|
394
|
+
* @example
|
|
395
|
+
* // Creating a text display component with a custom ID
|
|
396
|
+
* const textDisplay = createTextDisplay("Welcome!", 123);
|
|
397
|
+
*/
|
|
398
|
+
declare function createTextDisplay(content: string, id?: number): TextDisplayBuilder;
|
|
399
|
+
|
|
400
|
+
type ComponentData = TextDisplayBuilder | SeparatorBuilder | FileBuilder | SectionBuilder | MediaGalleryBuilder | ActionRowBuilder<MessageActionRowComponentBuilder> | MessageActionRowComponentBuilder[] | MessageActionRowComponentBuilder | AttachmentBuilder | AttachmentBuilder | string | null | undefined;
|
|
401
|
+
declare function createComponents(...data: (ComponentData | ContainerBuilder)[]): (TextDisplayBuilder | SeparatorBuilder | FileBuilder | SectionBuilder | MediaGalleryBuilder | ActionRowBuilder<MessageActionRowComponentBuilder> | _discordjs_builders.ButtonBuilder | ContainerBuilder | undefined)[];
|
|
402
|
+
|
|
403
|
+
type PresetColor = keyof typeof Colors;
|
|
404
|
+
interface ContainerData extends Omit<ContainerComponentData, "accentColor" | "type" | "components"> {
|
|
405
|
+
accentColor?: (string & {}) | number | null | RGBTuple | PresetColor;
|
|
406
|
+
components: ComponentData[];
|
|
407
|
+
}
|
|
408
|
+
/**
|
|
409
|
+
* Creates a {@link ContainerBuilder} component with customizable accent color and components.
|
|
410
|
+
*
|
|
411
|
+
* This function generates a container that can include various components such as text displays, action rows,
|
|
412
|
+
* buttons, media galleries, and more. The container also allows for setting an accent color, which can be
|
|
413
|
+
* either a string (hex color), a number, a predefined color, or an RGB tuple.
|
|
414
|
+
*
|
|
415
|
+
* **Parameters:**
|
|
416
|
+
* - `accentColor` (optional): The accent color for the container. This can be:
|
|
417
|
+
* - A hexadecimal color code (string) such as `"#ff5733"`.
|
|
418
|
+
* - A numeric value representing the color.
|
|
419
|
+
* - An {@link RGBTuple} (an array of three numbers representing RGB values).
|
|
420
|
+
* - A predefined color from the {@link Colors} enum (e.g., `Colors.Red`).
|
|
421
|
+
* - `components`: An array of components that can be added to the container. These components can be:
|
|
422
|
+
* - {@link TextDisplayBuilder}, a string, {@link ActionRowBuilder}, {@link ButtonBuilder},
|
|
423
|
+
* - {@link SectionBuilder}, {@link MediaGalleryBuilder}, {@link FileBuilder}, or
|
|
424
|
+
* - {@link SeparatorBuilder}. Attachments are also accepted and will be handled as media galleries.
|
|
425
|
+
*
|
|
426
|
+
* @param data - An object containing the properties `accentColor` and `components` for configuring the container.
|
|
427
|
+
*
|
|
428
|
+
* @returns A {@link ContainerBuilder} instance with the specified configuration.
|
|
429
|
+
*
|
|
430
|
+
* @example
|
|
431
|
+
* // Creating a container with an accent color and a text display component
|
|
432
|
+
* const container = createContainer({
|
|
433
|
+
* accentColor: "#ff5733", // Hex color code
|
|
434
|
+
* components: [
|
|
435
|
+
* "This is a text display component"
|
|
436
|
+
* ]
|
|
437
|
+
* });
|
|
438
|
+
*
|
|
439
|
+
* @example
|
|
440
|
+
* // Creating a container with predefined color and an action row containing a button
|
|
441
|
+
* const container = createContainer({
|
|
442
|
+
* accentColor: Colors.Green, // Predefined color from Colors enum
|
|
443
|
+
* components: [
|
|
444
|
+
* createSection({
|
|
445
|
+
* content: "-# Increment counter",
|
|
446
|
+
* button: new ButtonBuilder({
|
|
447
|
+
* customId: `counter/increment`,
|
|
448
|
+
* label: "+",
|
|
449
|
+
* style: ButtonStyle.Success
|
|
450
|
+
* })
|
|
451
|
+
* }),
|
|
452
|
+
* ]
|
|
453
|
+
* });
|
|
454
|
+
*
|
|
455
|
+
* @example
|
|
456
|
+
* // Creating a container with an RGB tuple as the accent color
|
|
457
|
+
* const container = createContainer({
|
|
458
|
+
* accentColor: [255, 87, 51], // RGB tuple
|
|
459
|
+
* components: [
|
|
460
|
+
* "Here's some content."
|
|
461
|
+
* ]
|
|
462
|
+
* });
|
|
463
|
+
*/
|
|
464
|
+
declare function createContainer(data: ContainerData): ContainerBuilder;
|
|
465
|
+
|
|
186
466
|
type GuildChannelType = Exclude<ChannelType, ChannelType.DM>;
|
|
187
467
|
type FindChannelFilter<T extends GuildChannelType> = (channel: GetChannelType<T>) => boolean;
|
|
188
468
|
type GetChannelType<Type extends GuildChannelType> = Extract<NonNullable<CommandInteractionOption<"cached">["channel"]>, {
|
|
@@ -311,4 +591,10 @@ declare function extractMentionId(mention: string): string | null;
|
|
|
311
591
|
declare function createWebhookClient(url: string, options?: WebhookClientOptions): WebhookClient | null;
|
|
312
592
|
declare function createWebhookClient(data: WebhookClientData, options?: WebhookClientOptions): WebhookClient | null;
|
|
313
593
|
|
|
314
|
-
|
|
594
|
+
declare function isAttachment(value: unknown): value is Attachment | AttachmentBuilder;
|
|
595
|
+
|
|
596
|
+
type AnySelectMenuBuilder = StringSelectMenuBuilder | UserSelectMenuBuilder | RoleSelectMenuBuilder | ChannelSelectMenuBuilder | MentionableSelectMenuBuilder;
|
|
597
|
+
declare function isAnySelectMenuBuilder(value: unknown): value is AnySelectMenuBuilder;
|
|
598
|
+
|
|
599
|
+
export { CustomItents, CustomPartials, EmbedLimit, EmbedPlusBuilder, chars, commandMention, createComponents, createContainer, createEmbed, createEmbedAsset, createEmbedAuthor, createEmbedFiles, createEmbedFooter, createFile, createLinkButton, createMediaGallery, createModalFields, createModalInput, createRow, createSection, createSeparator, createTextDisplay, createThumbnail, createWebhookClient, extractMentionId, findChannel, findCommand, findEmoji, findMember, findMessage, findRole, getChannelUrlInfo, getMessageUrlInfo, isAnySelectMenuBuilder, isAttachment, modalFieldsToRecord, setMobileStatus };
|
|
600
|
+
export type { AnyEmbedData, AnySelectMenuBuilder, ComponentData, ContainerData, EmbedPlusAssetData, EmbedPlusAuthorData, EmbedPlusColorData, EmbedPlusData, EmbedPlusFooterData, EmbedPlusProperty, PresetColor, SectionAcessoryData, SectionData, SeparatorData, ThumbnailData };
|