@discordjs/builders 1.4.0-dev.1668859431-ff85481.0 → 1.4.0-dev.1669507861-decbce4.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 +22 -15
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +14 -14
package/dist/index.d.ts
CHANGED
|
@@ -96,9 +96,9 @@ declare namespace Assertions$5 {
|
|
|
96
96
|
}
|
|
97
97
|
|
|
98
98
|
declare function normalizeArray<T>(arr: RestOrArray<T>): T[];
|
|
99
|
-
|
|
99
|
+
type RestOrArray<T> = T[] | [T[]];
|
|
100
100
|
|
|
101
|
-
|
|
101
|
+
type RGBTuple = [red: number, green: number, blue: number];
|
|
102
102
|
interface IconData {
|
|
103
103
|
/**
|
|
104
104
|
* The URL of the icon
|
|
@@ -109,10 +109,10 @@ interface IconData {
|
|
|
109
109
|
*/
|
|
110
110
|
proxyIconURL?: string;
|
|
111
111
|
}
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
112
|
+
type EmbedAuthorData = IconData & Omit<APIEmbedAuthor, 'icon_url' | 'proxy_icon_url'>;
|
|
113
|
+
type EmbedAuthorOptions = Omit<EmbedAuthorData, 'proxyIconURL'>;
|
|
114
|
+
type EmbedFooterData = IconData & Omit<APIEmbedFooter, 'icon_url' | 'proxy_icon_url'>;
|
|
115
|
+
type EmbedFooterOptions = Omit<EmbedFooterData, 'proxyIconURL'>;
|
|
116
116
|
interface EmbedImageData extends Omit<APIEmbedImage, 'proxy_url'> {
|
|
117
117
|
/**
|
|
118
118
|
* The proxy URL for the image
|
|
@@ -409,6 +409,13 @@ declare function formatEmoji<C extends Snowflake>(emojiId: C, animated?: false):
|
|
|
409
409
|
* @param animated - Whether the emoji is animated or not. Defaults to `false`
|
|
410
410
|
*/
|
|
411
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}>`;
|
|
412
419
|
/**
|
|
413
420
|
* Formats a channel link for a direct message channel.
|
|
414
421
|
*
|
|
@@ -499,7 +506,7 @@ declare const TimestampStyles: {
|
|
|
499
506
|
/**
|
|
500
507
|
* The possible values, see {@link TimestampStyles} for more information
|
|
501
508
|
*/
|
|
502
|
-
|
|
509
|
+
type TimestampStylesString = typeof TimestampStyles[keyof typeof TimestampStyles];
|
|
503
510
|
/**
|
|
504
511
|
* An enum with all the available faces from Discord's native slash commands
|
|
505
512
|
*/
|
|
@@ -669,7 +676,7 @@ declare namespace Assertions$4 {
|
|
|
669
676
|
};
|
|
670
677
|
}
|
|
671
678
|
|
|
672
|
-
|
|
679
|
+
type AnyAPIActionRowComponent = APIActionRowComponent<APIActionRowComponentTypes> | APIActionRowComponentTypes;
|
|
673
680
|
/**
|
|
674
681
|
* Represents a discord component
|
|
675
682
|
*
|
|
@@ -1060,11 +1067,11 @@ declare class TextInputBuilder extends ComponentBuilder<APITextInputComponent> i
|
|
|
1060
1067
|
equals(other: APITextInputComponent | JSONEncodable<APITextInputComponent>): boolean;
|
|
1061
1068
|
}
|
|
1062
1069
|
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1070
|
+
type MessageComponentBuilder = ActionRowBuilder<MessageActionRowComponentBuilder> | MessageActionRowComponentBuilder;
|
|
1071
|
+
type ModalComponentBuilder = ActionRowBuilder<ModalActionRowComponentBuilder> | ModalActionRowComponentBuilder;
|
|
1072
|
+
type MessageActionRowComponentBuilder = ButtonBuilder | ChannelSelectMenuBuilder | MentionableSelectMenuBuilder | RoleSelectMenuBuilder | StringSelectMenuBuilder | UserSelectMenuBuilder;
|
|
1073
|
+
type ModalActionRowComponentBuilder = TextInputBuilder;
|
|
1074
|
+
type AnyComponentBuilder = MessageActionRowComponentBuilder | ModalActionRowComponentBuilder;
|
|
1068
1075
|
/**
|
|
1069
1076
|
* Represents an action row component
|
|
1070
1077
|
*
|
|
@@ -1294,7 +1301,7 @@ declare class SlashCommandBooleanOption extends ApplicationCommandOptionBase {
|
|
|
1294
1301
|
}
|
|
1295
1302
|
|
|
1296
1303
|
declare const allowedChannelTypes: readonly [ChannelType.GuildText, ChannelType.GuildVoice, ChannelType.GuildCategory, ChannelType.GuildAnnouncement, ChannelType.AnnouncementThread, ChannelType.PublicThread, ChannelType.PrivateThread, ChannelType.GuildStageVoice, ChannelType.GuildForum];
|
|
1297
|
-
|
|
1304
|
+
type ApplicationCommandOptionAllowedChannelTypes = typeof allowedChannelTypes[number];
|
|
1298
1305
|
declare class ApplicationCommandOptionChannelTypesMixin {
|
|
1299
1306
|
readonly channel_types?: ApplicationCommandOptionAllowedChannelTypes[];
|
|
1300
1307
|
/**
|
|
@@ -1749,7 +1756,7 @@ declare class ContextMenuCommandBuilder {
|
|
|
1749
1756
|
*/
|
|
1750
1757
|
toJSON(): RESTPostAPIContextMenuApplicationCommandsJSONBody;
|
|
1751
1758
|
}
|
|
1752
|
-
|
|
1759
|
+
type ContextMenuCommandType = ApplicationCommandType.Message | ApplicationCommandType.User;
|
|
1753
1760
|
|
|
1754
1761
|
declare function validateDefaultPermission(value: unknown): asserts value is boolean;
|
|
1755
1762
|
declare function validateName(name: unknown): asserts name is string;
|
package/dist/index.js
CHANGED
|
@@ -1576,7 +1576,7 @@ __name(embedLength, "embedLength");
|
|
|
1576
1576
|
|
|
1577
1577
|
// src/index.ts
|
|
1578
1578
|
__reExport(src_exports, require("@discordjs/util"), module.exports);
|
|
1579
|
-
var version = "1.4.0-dev.
|
|
1579
|
+
var version = "1.4.0-dev.1669507861-decbce4.0";
|
|
1580
1580
|
// Annotate the CommonJS export names for ESM import in node:
|
|
1581
1581
|
0 && (module.exports = {
|
|
1582
1582
|
ActionRowBuilder,
|