@discordjs/builders 1.4.1-dev.1669982650-4e4cbb3.0 → 1.4.1-dev.1670026132-a0d6bc4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +2 -277
- package/dist/index.js +3 -148
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +3 -127
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import * as _sapphire_shapeshift from '@sapphire/shapeshift';
|
|
2
2
|
import { APIEmbedField, APIEmbedAuthor, APIEmbedFooter, APIEmbedImage, APIEmbed, APISelectMenuOption, APIMessageComponentEmoji, ButtonStyle, ChannelType, APIActionRowComponent, APIActionRowComponentTypes, APIBaseComponent, ComponentType, APIButtonComponent, APISelectMenuComponent, APIChannelSelectComponent, APIMentionableSelectComponent, APIRoleSelectComponent, APIStringSelectComponent, APIUserSelectComponent, APITextInputComponent, TextInputStyle, APIMessageActionRowComponent, APIModalActionRowComponent, APIModalComponent, APIMessageComponent, APIModalInteractionResponseCallbackData, LocalizationMap, LocaleString, ApplicationCommandOptionType, APIApplicationCommandBasicOption, APIApplicationCommandAttachmentOption, APIApplicationCommandBooleanOption, APIApplicationCommandChannelOption, APIApplicationCommandOptionChoice, APIApplicationCommandIntegerOption, APIApplicationCommandMentionableOption, APIApplicationCommandNumberOption, APIApplicationCommandRoleOption, APIApplicationCommandStringOption, APIApplicationCommandUserOption, APIApplicationCommandSubcommandGroupOption, APIApplicationCommandSubcommandOption, Permissions, RESTPostAPIChatInputApplicationCommandsJSONBody, APIApplicationCommandOption, Locale, RESTPostAPIContextMenuApplicationCommandsJSONBody, ApplicationCommandType } from 'discord-api-types/v10';
|
|
3
|
-
|
|
4
|
-
import { Snowflake } from 'discord-api-types/globals';
|
|
3
|
+
export * from '@discordjs/formatters';
|
|
5
4
|
import { JSONEncodable, Equatable } from '@discordjs/util';
|
|
6
5
|
export * from '@discordjs/util';
|
|
7
6
|
|
|
@@ -251,280 +250,6 @@ declare class EmbedBuilder {
|
|
|
251
250
|
toJSON(): APIEmbed;
|
|
252
251
|
}
|
|
253
252
|
|
|
254
|
-
/**
|
|
255
|
-
* Wraps the content inside a codeblock with no language
|
|
256
|
-
*
|
|
257
|
-
* @param content - The content to wrap
|
|
258
|
-
*/
|
|
259
|
-
declare function codeBlock<C extends string>(content: C): `\`\`\`\n${C}\n\`\`\``;
|
|
260
|
-
/**
|
|
261
|
-
* Wraps the content inside a codeblock with the specified language
|
|
262
|
-
*
|
|
263
|
-
* @param language - The language for the codeblock
|
|
264
|
-
* @param content - The content to wrap
|
|
265
|
-
*/
|
|
266
|
-
declare function codeBlock<L extends string, C extends string>(language: L, content: C): `\`\`\`${L}\n${C}\n\`\`\``;
|
|
267
|
-
/**
|
|
268
|
-
* Wraps the content inside \`backticks\`, which formats it as inline code
|
|
269
|
-
*
|
|
270
|
-
* @param content - The content to wrap
|
|
271
|
-
*/
|
|
272
|
-
declare function inlineCode<C extends string>(content: C): `\`${C}\``;
|
|
273
|
-
/**
|
|
274
|
-
* Formats the content into italic text
|
|
275
|
-
*
|
|
276
|
-
* @param content - The content to wrap
|
|
277
|
-
*/
|
|
278
|
-
declare function italic<C extends string>(content: C): `_${C}_`;
|
|
279
|
-
/**
|
|
280
|
-
* Formats the content into bold text
|
|
281
|
-
*
|
|
282
|
-
* @param content - The content to wrap
|
|
283
|
-
*/
|
|
284
|
-
declare function bold<C extends string>(content: C): `**${C}**`;
|
|
285
|
-
/**
|
|
286
|
-
* Formats the content into underscored text
|
|
287
|
-
*
|
|
288
|
-
* @param content - The content to wrap
|
|
289
|
-
*/
|
|
290
|
-
declare function underscore<C extends string>(content: C): `__${C}__`;
|
|
291
|
-
/**
|
|
292
|
-
* Formats the content into strike-through text
|
|
293
|
-
*
|
|
294
|
-
* @param content - The content to wrap
|
|
295
|
-
*/
|
|
296
|
-
declare function strikethrough<C extends string>(content: C): `~~${C}~~`;
|
|
297
|
-
/**
|
|
298
|
-
* Formats the content into a quote. This needs to be at the start of the line for Discord to format it
|
|
299
|
-
*
|
|
300
|
-
* @param content - The content to wrap
|
|
301
|
-
*/
|
|
302
|
-
declare function quote<C extends string>(content: C): `> ${C}`;
|
|
303
|
-
/**
|
|
304
|
-
* Formats the content into a block quote. This needs to be at the start of the line for Discord to format it
|
|
305
|
-
*
|
|
306
|
-
* @param content - The content to wrap
|
|
307
|
-
*/
|
|
308
|
-
declare function blockQuote<C extends string>(content: C): `>>> ${C}`;
|
|
309
|
-
/**
|
|
310
|
-
* Wraps the URL into `<>`, which stops it from embedding
|
|
311
|
-
*
|
|
312
|
-
* @param url - The URL to wrap
|
|
313
|
-
*/
|
|
314
|
-
declare function hideLinkEmbed<C extends string>(url: C): `<${C}>`;
|
|
315
|
-
/**
|
|
316
|
-
* Wraps the URL into `<>`, which stops it from embedding
|
|
317
|
-
*
|
|
318
|
-
* @param url - The URL to wrap
|
|
319
|
-
*/
|
|
320
|
-
declare function hideLinkEmbed(url: URL): `<${string}>`;
|
|
321
|
-
/**
|
|
322
|
-
* Formats the content and the URL into a masked URL
|
|
323
|
-
*
|
|
324
|
-
* @param content - The content to display
|
|
325
|
-
* @param url - The URL the content links to
|
|
326
|
-
*/
|
|
327
|
-
declare function hyperlink<C extends string>(content: C, url: URL): `[${C}](${string})`;
|
|
328
|
-
/**
|
|
329
|
-
* Formats the content and the URL into a masked URL
|
|
330
|
-
*
|
|
331
|
-
* @param content - The content to display
|
|
332
|
-
* @param url - The URL the content links to
|
|
333
|
-
*/
|
|
334
|
-
declare function hyperlink<C extends string, U extends string>(content: C, url: U): `[${C}](${U})`;
|
|
335
|
-
/**
|
|
336
|
-
* Formats the content and the URL into a masked URL
|
|
337
|
-
*
|
|
338
|
-
* @param content - The content to display
|
|
339
|
-
* @param url - The URL the content links to
|
|
340
|
-
* @param title - The title shown when hovering on the masked link
|
|
341
|
-
*/
|
|
342
|
-
declare function hyperlink<C extends string, T extends string>(content: C, url: URL, title: T): `[${C}](${string} "${T}")`;
|
|
343
|
-
/**
|
|
344
|
-
* Formats the content and the URL into a masked URL
|
|
345
|
-
*
|
|
346
|
-
* @param content - The content to display
|
|
347
|
-
* @param url - The URL the content links to
|
|
348
|
-
* @param title - The title shown when hovering on the masked link
|
|
349
|
-
*/
|
|
350
|
-
declare function hyperlink<C extends string, U extends string, T extends string>(content: C, url: U, title: T): `[${C}](${U} "${T}")`;
|
|
351
|
-
/**
|
|
352
|
-
* Wraps the content inside spoiler (hidden text)
|
|
353
|
-
*
|
|
354
|
-
* @param content - The content to wrap
|
|
355
|
-
*/
|
|
356
|
-
declare function spoiler<C extends string>(content: C): `||${C}||`;
|
|
357
|
-
/**
|
|
358
|
-
* Formats a user ID into a user mention
|
|
359
|
-
*
|
|
360
|
-
* @param userId - The user ID to format
|
|
361
|
-
*/
|
|
362
|
-
declare function userMention<C extends Snowflake>(userId: C): `<@${C}>`;
|
|
363
|
-
/**
|
|
364
|
-
* Formats a channel ID into a channel mention
|
|
365
|
-
*
|
|
366
|
-
* @param channelId - The channel ID to format
|
|
367
|
-
*/
|
|
368
|
-
declare function channelMention<C extends Snowflake>(channelId: C): `<#${C}>`;
|
|
369
|
-
/**
|
|
370
|
-
* Formats a role ID into a role mention
|
|
371
|
-
*
|
|
372
|
-
* @param roleId - The role ID to format
|
|
373
|
-
*/
|
|
374
|
-
declare function roleMention<C extends Snowflake>(roleId: C): `<@&${C}>`;
|
|
375
|
-
/**
|
|
376
|
-
* Formats an application command name, subcommand group name, subcommand name, and ID into an application command mention
|
|
377
|
-
*
|
|
378
|
-
* @param commandName - The application command name to format
|
|
379
|
-
* @param subcommandGroupName - The subcommand group name to format
|
|
380
|
-
* @param subcommandName - The subcommand name to format
|
|
381
|
-
* @param commandId - The application command ID to format
|
|
382
|
-
*/
|
|
383
|
-
declare function chatInputApplicationCommandMention<N extends string, G extends string, S extends string, I extends Snowflake>(commandName: N, subcommandGroupName: G, subcommandName: S, commandId: I): `</${N} ${G} ${S}:${I}>`;
|
|
384
|
-
/**
|
|
385
|
-
* Formats an application command name, subcommand name, and ID into an application command mention
|
|
386
|
-
*
|
|
387
|
-
* @param commandName - The application command name to format
|
|
388
|
-
* @param subcommandName - The subcommand name to format
|
|
389
|
-
* @param commandId - The application command ID to format
|
|
390
|
-
*/
|
|
391
|
-
declare function chatInputApplicationCommandMention<N extends string, S extends string, I extends Snowflake>(commandName: N, subcommandName: S, commandId: I): `</${N} ${S}:${I}>`;
|
|
392
|
-
/**
|
|
393
|
-
* Formats an application command name and ID into an application command mention
|
|
394
|
-
*
|
|
395
|
-
* @param commandName - The application command name to format
|
|
396
|
-
* @param commandId - The application command ID to format
|
|
397
|
-
*/
|
|
398
|
-
declare function chatInputApplicationCommandMention<N extends string, I extends Snowflake>(commandName: N, commandId: I): `</${N}:${I}>`;
|
|
399
|
-
/**
|
|
400
|
-
* Formats an emoji ID into a fully qualified emoji identifier
|
|
401
|
-
*
|
|
402
|
-
* @param emojiId - The emoji ID to format
|
|
403
|
-
*/
|
|
404
|
-
declare function formatEmoji<C extends Snowflake>(emojiId: C, animated?: false): `<:_:${C}>`;
|
|
405
|
-
/**
|
|
406
|
-
* Formats an emoji ID into a fully qualified emoji identifier
|
|
407
|
-
*
|
|
408
|
-
* @param emojiId - The emoji ID to format
|
|
409
|
-
* @param animated - Whether the emoji is animated or not. Defaults to `false`
|
|
410
|
-
*/
|
|
411
|
-
declare function formatEmoji<C extends Snowflake>(emojiId: C, animated?: true): `<a:_:${C}>`;
|
|
412
|
-
/**
|
|
413
|
-
* Formats an emoji ID into a fully qualified emoji identifier
|
|
414
|
-
*
|
|
415
|
-
* @param emojiId - The emoji ID to format
|
|
416
|
-
* @param animated - Whether the emoji is animated or not. Defaults to `false`
|
|
417
|
-
*/
|
|
418
|
-
declare function formatEmoji<C extends Snowflake>(emojiId: C, animated?: boolean): `<:_:${C}>` | `<a:_:${C}>`;
|
|
419
|
-
/**
|
|
420
|
-
* Formats a channel link for a direct message channel.
|
|
421
|
-
*
|
|
422
|
-
* @param channelId - The channel's id
|
|
423
|
-
*/
|
|
424
|
-
declare function channelLink<C extends Snowflake>(channelId: C): `https://discord.com/channels/@me/${C}`;
|
|
425
|
-
/**
|
|
426
|
-
* Formats a channel link for a guild channel.
|
|
427
|
-
*
|
|
428
|
-
* @param channelId - The channel's id
|
|
429
|
-
* @param guildId - The guild's id
|
|
430
|
-
*/
|
|
431
|
-
declare function channelLink<C extends Snowflake, G extends Snowflake>(channelId: C, guildId: G): `https://discord.com/channels/${G}/${C}`;
|
|
432
|
-
/**
|
|
433
|
-
* Formats a message link for a direct message channel.
|
|
434
|
-
*
|
|
435
|
-
* @param channelId - The channel's id
|
|
436
|
-
* @param messageId - The message's id
|
|
437
|
-
*/
|
|
438
|
-
declare function messageLink<C extends Snowflake, M extends Snowflake>(channelId: C, messageId: M): `https://discord.com/channels/@me/${C}/${M}`;
|
|
439
|
-
/**
|
|
440
|
-
* Formats a message link for a guild channel.
|
|
441
|
-
*
|
|
442
|
-
* @param channelId - The channel's id
|
|
443
|
-
* @param messageId - The message's id
|
|
444
|
-
* @param guildId - The guild's id
|
|
445
|
-
*/
|
|
446
|
-
declare function messageLink<C extends Snowflake, M extends Snowflake, G extends Snowflake>(channelId: C, messageId: M, guildId: G): `https://discord.com/channels/${G}/${C}/${M}`;
|
|
447
|
-
/**
|
|
448
|
-
* Formats a date into a short date-time string
|
|
449
|
-
*
|
|
450
|
-
* @param date - The date to format, defaults to the current time
|
|
451
|
-
*/
|
|
452
|
-
declare function time(date?: Date): `<t:${bigint}>`;
|
|
453
|
-
/**
|
|
454
|
-
* Formats a date given a format style
|
|
455
|
-
*
|
|
456
|
-
* @param date - The date to format
|
|
457
|
-
* @param style - The style to use
|
|
458
|
-
*/
|
|
459
|
-
declare function time<S extends TimestampStylesString>(date: Date, style: S): `<t:${bigint}:${S}>`;
|
|
460
|
-
/**
|
|
461
|
-
* Formats the given timestamp into a short date-time string
|
|
462
|
-
*
|
|
463
|
-
* @param seconds - The time to format, represents an UNIX timestamp in seconds
|
|
464
|
-
*/
|
|
465
|
-
declare function time<C extends number>(seconds: C): `<t:${C}>`;
|
|
466
|
-
/**
|
|
467
|
-
* Formats the given timestamp into a short date-time string
|
|
468
|
-
*
|
|
469
|
-
* @param seconds - The time to format, represents an UNIX timestamp in seconds
|
|
470
|
-
* @param style - The style to use
|
|
471
|
-
*/
|
|
472
|
-
declare function time<C extends number, S extends TimestampStylesString>(seconds: C, style: S): `<t:${C}:${S}>`;
|
|
473
|
-
/**
|
|
474
|
-
* The {@link https://discord.com/developers/docs/reference#message-formatting-timestamp-styles | message formatting timestamp styles} supported by Discord
|
|
475
|
-
*/
|
|
476
|
-
declare const TimestampStyles: {
|
|
477
|
-
/**
|
|
478
|
-
* Short time format, consisting of hours and minutes, e.g. 16:20
|
|
479
|
-
*/
|
|
480
|
-
readonly ShortTime: "t";
|
|
481
|
-
/**
|
|
482
|
-
* Long time format, consisting of hours, minutes, and seconds, e.g. 16:20:30
|
|
483
|
-
*/
|
|
484
|
-
readonly LongTime: "T";
|
|
485
|
-
/**
|
|
486
|
-
* Short date format, consisting of day, month, and year, e.g. 20/04/2021
|
|
487
|
-
*/
|
|
488
|
-
readonly ShortDate: "d";
|
|
489
|
-
/**
|
|
490
|
-
* Long date format, consisting of day, month, and year, e.g. 20 April 2021
|
|
491
|
-
*/
|
|
492
|
-
readonly LongDate: "D";
|
|
493
|
-
/**
|
|
494
|
-
* Short date-time format, consisting of short date and short time formats, e.g. 20 April 2021 16:20
|
|
495
|
-
*/
|
|
496
|
-
readonly ShortDateTime: "f";
|
|
497
|
-
/**
|
|
498
|
-
* Long date-time format, consisting of long date and short time formats, e.g. Tuesday, 20 April 2021 16:20
|
|
499
|
-
*/
|
|
500
|
-
readonly LongDateTime: "F";
|
|
501
|
-
/**
|
|
502
|
-
* Relative time format, consisting of a relative duration format, e.g. 2 months ago
|
|
503
|
-
*/
|
|
504
|
-
readonly RelativeTime: "R";
|
|
505
|
-
};
|
|
506
|
-
/**
|
|
507
|
-
* The possible values, see {@link TimestampStyles} for more information
|
|
508
|
-
*/
|
|
509
|
-
type TimestampStylesString = typeof TimestampStyles[keyof typeof TimestampStyles];
|
|
510
|
-
/**
|
|
511
|
-
* An enum with all the available faces from Discord's native slash commands
|
|
512
|
-
*/
|
|
513
|
-
declare enum Faces {
|
|
514
|
-
/**
|
|
515
|
-
* ¯\\_(ツ)\\_/¯
|
|
516
|
-
*/
|
|
517
|
-
Shrug = "\u00AF\\_(\u30C4)\\_/\u00AF",
|
|
518
|
-
/**
|
|
519
|
-
* (╯°□°)╯︵ ┻━┻
|
|
520
|
-
*/
|
|
521
|
-
Tableflip = "(\u256F\u00B0\u25A1\u00B0\uFF09\u256F\uFE35 \u253B\u2501\u253B",
|
|
522
|
-
/**
|
|
523
|
-
* ┬─┬ ノ( ゜-゜ノ)
|
|
524
|
-
*/
|
|
525
|
-
Unflip = "\u252C\u2500\u252C \u30CE( \u309C-\u309C\u30CE)"
|
|
526
|
-
}
|
|
527
|
-
|
|
528
253
|
/**
|
|
529
254
|
* Represents an option within a string select menu component
|
|
530
255
|
*/
|
|
@@ -1794,4 +1519,4 @@ declare const isValidationEnabled: () => boolean;
|
|
|
1794
1519
|
*/
|
|
1795
1520
|
declare const version: string;
|
|
1796
1521
|
|
|
1797
|
-
export { ActionRowBuilder, AnyAPIActionRowComponent, AnyComponentBuilder, ApplicationCommandNumericOptionMinMaxValueMixin, ApplicationCommandOptionAllowedChannelTypes, ApplicationCommandOptionBase, ApplicationCommandOptionChannelTypesMixin, ApplicationCommandOptionWithChoicesAndAutocompleteMixin, BaseSelectMenuBuilder, ButtonBuilder, ChannelSelectMenuBuilder, Assertions$4 as ComponentAssertions, ComponentBuilder, Assertions as ContextMenuCommandAssertions, ContextMenuCommandBuilder, ContextMenuCommandType, Assertions$5 as EmbedAssertions, EmbedAuthorData, EmbedAuthorOptions, EmbedBuilder, EmbedFooterData, EmbedFooterOptions, EmbedImageData,
|
|
1522
|
+
export { ActionRowBuilder, AnyAPIActionRowComponent, AnyComponentBuilder, ApplicationCommandNumericOptionMinMaxValueMixin, ApplicationCommandOptionAllowedChannelTypes, ApplicationCommandOptionBase, ApplicationCommandOptionChannelTypesMixin, ApplicationCommandOptionWithChoicesAndAutocompleteMixin, BaseSelectMenuBuilder, ButtonBuilder, ChannelSelectMenuBuilder, Assertions$4 as ComponentAssertions, ComponentBuilder, Assertions as ContextMenuCommandAssertions, ContextMenuCommandBuilder, ContextMenuCommandType, Assertions$5 as EmbedAssertions, EmbedAuthorData, EmbedAuthorOptions, EmbedBuilder, EmbedFooterData, EmbedFooterOptions, EmbedImageData, IconData, MappedComponentTypes, MentionableSelectMenuBuilder, MessageActionRowComponentBuilder, MessageComponentBuilder, ModalActionRowComponentBuilder, Assertions$2 as ModalAssertions, ModalBuilder, ModalComponentBuilder, RGBTuple, RestOrArray, RoleSelectMenuBuilder, StringSelectMenuBuilder as SelectMenuBuilder, StringSelectMenuOptionBuilder as SelectMenuOptionBuilder, SharedNameAndDescription, SharedSlashCommandOptions, Assertions$1 as SlashCommandAssertions, SlashCommandAttachmentOption, SlashCommandBooleanOption, SlashCommandBuilder, SlashCommandChannelOption, SlashCommandIntegerOption, SlashCommandMentionableOption, SlashCommandNumberOption, SlashCommandOptionsOnlyBuilder, SlashCommandRoleOption, SlashCommandStringOption, SlashCommandSubcommandBuilder, SlashCommandSubcommandGroupBuilder, SlashCommandSubcommandsOnlyBuilder, SlashCommandUserOption, StringSelectMenuBuilder, StringSelectMenuOptionBuilder, Assertions$3 as TextInputAssertions, TextInputBuilder, ToAPIApplicationCommandOptions, UserSelectMenuBuilder, createComponentBuilder, disableValidators, embedLength, enableValidators, isValidationEnabled, normalizeArray, version };
|
package/dist/index.js
CHANGED
|
@@ -51,7 +51,6 @@ __export(src_exports, {
|
|
|
51
51
|
ContextMenuCommandBuilder: () => ContextMenuCommandBuilder,
|
|
52
52
|
EmbedAssertions: () => Assertions_exports,
|
|
53
53
|
EmbedBuilder: () => EmbedBuilder,
|
|
54
|
-
Faces: () => Faces,
|
|
55
54
|
MentionableSelectMenuBuilder: () => MentionableSelectMenuBuilder,
|
|
56
55
|
ModalAssertions: () => Assertions_exports4,
|
|
57
56
|
ModalBuilder: () => ModalBuilder,
|
|
@@ -77,33 +76,13 @@ __export(src_exports, {
|
|
|
77
76
|
StringSelectMenuOptionBuilder: () => StringSelectMenuOptionBuilder,
|
|
78
77
|
TextInputAssertions: () => Assertions_exports3,
|
|
79
78
|
TextInputBuilder: () => TextInputBuilder,
|
|
80
|
-
TimestampStyles: () => TimestampStyles,
|
|
81
79
|
UserSelectMenuBuilder: () => UserSelectMenuBuilder,
|
|
82
|
-
blockQuote: () => blockQuote,
|
|
83
|
-
bold: () => bold,
|
|
84
|
-
channelLink: () => channelLink,
|
|
85
|
-
channelMention: () => channelMention,
|
|
86
|
-
chatInputApplicationCommandMention: () => chatInputApplicationCommandMention,
|
|
87
|
-
codeBlock: () => codeBlock,
|
|
88
80
|
createComponentBuilder: () => createComponentBuilder,
|
|
89
81
|
disableValidators: () => disableValidators,
|
|
90
82
|
embedLength: () => embedLength,
|
|
91
83
|
enableValidators: () => enableValidators,
|
|
92
|
-
formatEmoji: () => formatEmoji,
|
|
93
|
-
hideLinkEmbed: () => hideLinkEmbed,
|
|
94
|
-
hyperlink: () => hyperlink,
|
|
95
|
-
inlineCode: () => inlineCode,
|
|
96
84
|
isValidationEnabled: () => isValidationEnabled,
|
|
97
|
-
italic: () => italic,
|
|
98
|
-
messageLink: () => messageLink,
|
|
99
85
|
normalizeArray: () => normalizeArray,
|
|
100
|
-
quote: () => quote,
|
|
101
|
-
roleMention: () => roleMention,
|
|
102
|
-
spoiler: () => spoiler,
|
|
103
|
-
strikethrough: () => strikethrough,
|
|
104
|
-
time: () => time,
|
|
105
|
-
underscore: () => underscore,
|
|
106
|
-
userMention: () => userMention,
|
|
107
86
|
version: () => version
|
|
108
87
|
});
|
|
109
88
|
module.exports = __toCommonJS(src_exports);
|
|
@@ -279,111 +258,8 @@ var EmbedBuilder = class {
|
|
|
279
258
|
};
|
|
280
259
|
__name(EmbedBuilder, "EmbedBuilder");
|
|
281
260
|
|
|
282
|
-
// src/
|
|
283
|
-
|
|
284
|
-
return typeof content === "undefined" ? `\`\`\`
|
|
285
|
-
${language}
|
|
286
|
-
\`\`\`` : `\`\`\`${language}
|
|
287
|
-
${content}
|
|
288
|
-
\`\`\``;
|
|
289
|
-
}
|
|
290
|
-
__name(codeBlock, "codeBlock");
|
|
291
|
-
function inlineCode(content) {
|
|
292
|
-
return `\`${content}\``;
|
|
293
|
-
}
|
|
294
|
-
__name(inlineCode, "inlineCode");
|
|
295
|
-
function italic(content) {
|
|
296
|
-
return `_${content}_`;
|
|
297
|
-
}
|
|
298
|
-
__name(italic, "italic");
|
|
299
|
-
function bold(content) {
|
|
300
|
-
return `**${content}**`;
|
|
301
|
-
}
|
|
302
|
-
__name(bold, "bold");
|
|
303
|
-
function underscore(content) {
|
|
304
|
-
return `__${content}__`;
|
|
305
|
-
}
|
|
306
|
-
__name(underscore, "underscore");
|
|
307
|
-
function strikethrough(content) {
|
|
308
|
-
return `~~${content}~~`;
|
|
309
|
-
}
|
|
310
|
-
__name(strikethrough, "strikethrough");
|
|
311
|
-
function quote(content) {
|
|
312
|
-
return `> ${content}`;
|
|
313
|
-
}
|
|
314
|
-
__name(quote, "quote");
|
|
315
|
-
function blockQuote(content) {
|
|
316
|
-
return `>>> ${content}`;
|
|
317
|
-
}
|
|
318
|
-
__name(blockQuote, "blockQuote");
|
|
319
|
-
function hideLinkEmbed(url) {
|
|
320
|
-
return `<${url}>`;
|
|
321
|
-
}
|
|
322
|
-
__name(hideLinkEmbed, "hideLinkEmbed");
|
|
323
|
-
function hyperlink(content, url, title) {
|
|
324
|
-
return title ? `[${content}](${url} "${title}")` : `[${content}](${url})`;
|
|
325
|
-
}
|
|
326
|
-
__name(hyperlink, "hyperlink");
|
|
327
|
-
function spoiler(content) {
|
|
328
|
-
return `||${content}||`;
|
|
329
|
-
}
|
|
330
|
-
__name(spoiler, "spoiler");
|
|
331
|
-
function userMention(userId) {
|
|
332
|
-
return `<@${userId}>`;
|
|
333
|
-
}
|
|
334
|
-
__name(userMention, "userMention");
|
|
335
|
-
function channelMention(channelId) {
|
|
336
|
-
return `<#${channelId}>`;
|
|
337
|
-
}
|
|
338
|
-
__name(channelMention, "channelMention");
|
|
339
|
-
function roleMention(roleId) {
|
|
340
|
-
return `<@&${roleId}>`;
|
|
341
|
-
}
|
|
342
|
-
__name(roleMention, "roleMention");
|
|
343
|
-
function chatInputApplicationCommandMention(commandName, subcommandGroupName, subcommandName, commandId) {
|
|
344
|
-
if (typeof commandId !== "undefined") {
|
|
345
|
-
return `</${commandName} ${subcommandGroupName} ${subcommandName}:${commandId}>`;
|
|
346
|
-
}
|
|
347
|
-
if (typeof subcommandName !== "undefined") {
|
|
348
|
-
return `</${commandName} ${subcommandGroupName}:${subcommandName}>`;
|
|
349
|
-
}
|
|
350
|
-
return `</${commandName}:${subcommandGroupName}>`;
|
|
351
|
-
}
|
|
352
|
-
__name(chatInputApplicationCommandMention, "chatInputApplicationCommandMention");
|
|
353
|
-
function formatEmoji(emojiId, animated = false) {
|
|
354
|
-
return `<${animated ? "a" : ""}:_:${emojiId}>`;
|
|
355
|
-
}
|
|
356
|
-
__name(formatEmoji, "formatEmoji");
|
|
357
|
-
function channelLink(channelId, guildId) {
|
|
358
|
-
return `https://discord.com/channels/${guildId ?? "@me"}/${channelId}`;
|
|
359
|
-
}
|
|
360
|
-
__name(channelLink, "channelLink");
|
|
361
|
-
function messageLink(channelId, messageId, guildId) {
|
|
362
|
-
return `${typeof guildId === "undefined" ? channelLink(channelId) : channelLink(channelId, guildId)}/${messageId}`;
|
|
363
|
-
}
|
|
364
|
-
__name(messageLink, "messageLink");
|
|
365
|
-
function time(timeOrSeconds, style) {
|
|
366
|
-
if (typeof timeOrSeconds !== "number") {
|
|
367
|
-
timeOrSeconds = Math.floor((timeOrSeconds?.getTime() ?? Date.now()) / 1e3);
|
|
368
|
-
}
|
|
369
|
-
return typeof style === "string" ? `<t:${timeOrSeconds}:${style}>` : `<t:${timeOrSeconds}>`;
|
|
370
|
-
}
|
|
371
|
-
__name(time, "time");
|
|
372
|
-
var TimestampStyles = {
|
|
373
|
-
ShortTime: "t",
|
|
374
|
-
LongTime: "T",
|
|
375
|
-
ShortDate: "d",
|
|
376
|
-
LongDate: "D",
|
|
377
|
-
ShortDateTime: "f",
|
|
378
|
-
LongDateTime: "F",
|
|
379
|
-
RelativeTime: "R"
|
|
380
|
-
};
|
|
381
|
-
var Faces = /* @__PURE__ */ ((Faces2) => {
|
|
382
|
-
Faces2["Shrug"] = "\xAF\\_(\u30C4)\\_/\xAF";
|
|
383
|
-
Faces2["Tableflip"] = "(\u256F\xB0\u25A1\xB0\uFF09\u256F\uFE35 \u253B\u2501\u253B";
|
|
384
|
-
Faces2["Unflip"] = "\u252C\u2500\u252C \u30CE( \u309C-\u309C\u30CE)";
|
|
385
|
-
return Faces2;
|
|
386
|
-
})(Faces || {});
|
|
261
|
+
// src/index.ts
|
|
262
|
+
__reExport(src_exports, require("@discordjs/formatters"), module.exports);
|
|
387
263
|
|
|
388
264
|
// src/components/Assertions.ts
|
|
389
265
|
var Assertions_exports2 = {};
|
|
@@ -1576,7 +1452,7 @@ __name(embedLength, "embedLength");
|
|
|
1576
1452
|
|
|
1577
1453
|
// src/index.ts
|
|
1578
1454
|
__reExport(src_exports, require("@discordjs/util"), module.exports);
|
|
1579
|
-
var version = "1.4.1-dev.
|
|
1455
|
+
var version = "1.4.1-dev.1670026132-a0d6bc4.0";
|
|
1580
1456
|
// Annotate the CommonJS export names for ESM import in node:
|
|
1581
1457
|
0 && (module.exports = {
|
|
1582
1458
|
ActionRowBuilder,
|
|
@@ -1593,7 +1469,6 @@ var version = "1.4.1-dev.1669982650-4e4cbb3.0";
|
|
|
1593
1469
|
ContextMenuCommandBuilder,
|
|
1594
1470
|
EmbedAssertions,
|
|
1595
1471
|
EmbedBuilder,
|
|
1596
|
-
Faces,
|
|
1597
1472
|
MentionableSelectMenuBuilder,
|
|
1598
1473
|
ModalAssertions,
|
|
1599
1474
|
ModalBuilder,
|
|
@@ -1619,33 +1494,13 @@ var version = "1.4.1-dev.1669982650-4e4cbb3.0";
|
|
|
1619
1494
|
StringSelectMenuOptionBuilder,
|
|
1620
1495
|
TextInputAssertions,
|
|
1621
1496
|
TextInputBuilder,
|
|
1622
|
-
TimestampStyles,
|
|
1623
1497
|
UserSelectMenuBuilder,
|
|
1624
|
-
blockQuote,
|
|
1625
|
-
bold,
|
|
1626
|
-
channelLink,
|
|
1627
|
-
channelMention,
|
|
1628
|
-
chatInputApplicationCommandMention,
|
|
1629
|
-
codeBlock,
|
|
1630
1498
|
createComponentBuilder,
|
|
1631
1499
|
disableValidators,
|
|
1632
1500
|
embedLength,
|
|
1633
1501
|
enableValidators,
|
|
1634
|
-
formatEmoji,
|
|
1635
|
-
hideLinkEmbed,
|
|
1636
|
-
hyperlink,
|
|
1637
|
-
inlineCode,
|
|
1638
1502
|
isValidationEnabled,
|
|
1639
|
-
italic,
|
|
1640
|
-
messageLink,
|
|
1641
1503
|
normalizeArray,
|
|
1642
|
-
quote,
|
|
1643
|
-
roleMention,
|
|
1644
|
-
spoiler,
|
|
1645
|
-
strikethrough,
|
|
1646
|
-
time,
|
|
1647
|
-
underscore,
|
|
1648
|
-
userMention,
|
|
1649
1504
|
version
|
|
1650
1505
|
});
|
|
1651
1506
|
//# sourceMappingURL=index.js.map
|