@discordjs/builders 2.0.0-dev.1741219959-e273afbb9 → 2.0.0-dev.1741953893-09beb8a6a
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.mts +1335 -8
- package/dist/index.d.ts +1335 -8
- package/dist/index.js +866 -14
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +858 -14
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as discord_api_types_v10 from 'discord-api-types/v10';
|
|
2
|
-
import { APIButtonComponent, APIButtonComponentWithSKUId, APIMessageComponentEmoji, APIActionRowComponent, APIActionRowComponentTypes, APIButtonComponentWithCustomId, APIButtonComponentWithURL, Snowflake, APISelectMenuComponent, APIChannelSelectComponent, ChannelType, APIMentionableSelectComponent, APISelectMenuDefaultValue, SelectMenuDefaultValueType, APIRoleSelectComponent, APISelectMenuOption, APIStringSelectComponent, APIUserSelectComponent, APITextInputComponent, TextInputStyle, ComponentType, APIModalComponent, APIMessageComponent, ButtonStyle, APIApplicationCommandIntegerOption, APIApplicationCommandChannelOption, APIApplicationCommandNumberOption, APIApplicationCommandStringOption, APIApplicationCommandOptionChoice, RESTPostAPIApplicationCommandsJSONBody, Locale, APIApplicationCommand, APIApplicationCommandOption, ApplicationCommandOptionType, APIApplicationCommandBasicOption, APIApplicationCommandSubcommandGroupOption, APIApplicationCommandSubcommandOption, InteractionContextType, ApplicationIntegrationType, Permissions, RESTPostAPIChatInputApplicationCommandsJSONBody, ApplicationCommandType, RESTPostAPIContextMenuApplicationCommandsJSONBody, APIModalInteractionResponseCallbackData, APIModalActionRowComponent, APIEmbedAuthor, APIEmbedField, APIEmbedFooter, APIEmbed, PollLayoutType, APIPollMedia, APIPartialEmoji, APIPollAnswer, RESTAPIPoll } from 'discord-api-types/v10';
|
|
2
|
+
import { APIButtonComponent, APIButtonComponentWithSKUId, APIMessageComponentEmoji, APIActionRowComponent, APIActionRowComponentTypes, APIButtonComponentWithCustomId, APIButtonComponentWithURL, Snowflake, APISelectMenuComponent, APIChannelSelectComponent, ChannelType, APIMentionableSelectComponent, APISelectMenuDefaultValue, SelectMenuDefaultValueType, APIRoleSelectComponent, APISelectMenuOption, APIStringSelectComponent, APIUserSelectComponent, APITextInputComponent, TextInputStyle, ComponentType, APIModalComponent, APIMessageComponent, ButtonStyle, APIApplicationCommandIntegerOption, APIApplicationCommandChannelOption, APIApplicationCommandNumberOption, APIApplicationCommandStringOption, APIApplicationCommandOptionChoice, RESTPostAPIApplicationCommandsJSONBody, Locale, APIApplicationCommand, APIApplicationCommandOption, ApplicationCommandOptionType, APIApplicationCommandBasicOption, APIApplicationCommandSubcommandGroupOption, APIApplicationCommandSubcommandOption, InteractionContextType, ApplicationIntegrationType, Permissions, RESTPostAPIChatInputApplicationCommandsJSONBody, ApplicationCommandType, RESTPostAPIContextMenuApplicationCommandsJSONBody, APIModalInteractionResponseCallbackData, APIModalActionRowComponent, APIEmbedAuthor, APIEmbedField, APIEmbedFooter, APIEmbed, PollLayoutType, APIPollMedia, APIPartialEmoji, APIPollAnswer, RESTAPIPoll, APIAllowedMentions, AllowedMentionsTypes, MessageReferenceType, RESTAPIAttachment, APIMessageReference, RESTPostAPIChannelMessageJSONBody, APIMessageActionRowComponent, APIAttachment, MessageFlags, APIPoll } from 'discord-api-types/v10';
|
|
3
3
|
import { JSONEncodable } from '@discordjs/util';
|
|
4
4
|
import * as ts_mixer_dist_types_types_js from 'ts-mixer/dist/types/types.js';
|
|
5
5
|
import * as zod from 'zod';
|
|
@@ -498,7 +498,7 @@ declare class StringSelectMenuBuilder extends BaseSelectMenuBuilder<APIStringSel
|
|
|
498
498
|
*
|
|
499
499
|
* @remarks
|
|
500
500
|
* This method behaves similarly
|
|
501
|
-
* to {@link https://developer.mozilla.org/
|
|
501
|
+
* to {@link https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array/slice | Array.prototype.splice()}.
|
|
502
502
|
* It's useful for modifying and adjusting the order of existing options.
|
|
503
503
|
* @example
|
|
504
504
|
* Remove the first option:
|
|
@@ -910,7 +910,7 @@ declare class ActionRowBuilder extends ComponentBuilder<APIActionRowComponent<AP
|
|
|
910
910
|
*
|
|
911
911
|
* @remarks
|
|
912
912
|
* This method behaves similarly
|
|
913
|
-
* to {@link https://developer.mozilla.org/
|
|
913
|
+
* to {@link https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array/splice | Array.prototype.splice()}.
|
|
914
914
|
*
|
|
915
915
|
* It's useful for modifying and adjusting order of the already-existing components of an action row.
|
|
916
916
|
* @example
|
|
@@ -3851,7 +3851,7 @@ declare class SharedChatInputCommandOptions {
|
|
|
3851
3851
|
*
|
|
3852
3852
|
* @remarks
|
|
3853
3853
|
* This method behaves similarly
|
|
3854
|
-
* to {@link https://developer.mozilla.org/
|
|
3854
|
+
* to {@link https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array/splice | Array.prototype.splice()}.
|
|
3855
3855
|
*
|
|
3856
3856
|
* It's useful for modifying and adjusting order of the already-existing options for this command.
|
|
3857
3857
|
* @example
|
|
@@ -7548,7 +7548,7 @@ declare class ModalBuilder implements JSONEncodable<APIModalInteractionResponseC
|
|
|
7548
7548
|
*
|
|
7549
7549
|
* @remarks
|
|
7550
7550
|
* This method behaves similarly
|
|
7551
|
-
* to {@link https://developer.mozilla.org/
|
|
7551
|
+
* to {@link https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array/splice | Array.prototype.splice()}.
|
|
7552
7552
|
* The maximum amount of action rows that can be added is 5.
|
|
7553
7553
|
*
|
|
7554
7554
|
* It's useful for modifying and adjusting order of the already-existing action rows of a modal.
|
|
@@ -8012,7 +8012,7 @@ declare class EmbedBuilder implements JSONEncodable<APIEmbed> {
|
|
|
8012
8012
|
*
|
|
8013
8013
|
* @remarks
|
|
8014
8014
|
* This method behaves similarly
|
|
8015
|
-
* to {@link https://developer.mozilla.org/
|
|
8015
|
+
* to {@link https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array/splice | Array.prototype.splice()}.
|
|
8016
8016
|
* The maximum amount of fields that can be added is 25.
|
|
8017
8017
|
*
|
|
8018
8018
|
* It's useful for modifying and adjusting order of the already-existing fields of an embed.
|
|
@@ -8516,7 +8516,7 @@ declare class PollBuilder implements JSONEncodable<RESTAPIPoll> {
|
|
|
8516
8516
|
*
|
|
8517
8517
|
* @remarks
|
|
8518
8518
|
* This method behaves similarly
|
|
8519
|
-
* to {@link https://developer.mozilla.org/
|
|
8519
|
+
* to {@link https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array/splice | Array.prototype.splice()}.
|
|
8520
8520
|
* The maximum amount of answers that can be added is 10.
|
|
8521
8521
|
*
|
|
8522
8522
|
* It's useful for modifying and adjusting order of the already-existing answers of a poll.
|
|
@@ -8606,6 +8606,1333 @@ declare class PollBuilder implements JSONEncodable<RESTAPIPoll> {
|
|
|
8606
8606
|
toJSON(validationOverride?: boolean): RESTAPIPoll;
|
|
8607
8607
|
}
|
|
8608
8608
|
|
|
8609
|
+
/**
|
|
8610
|
+
* A builder that creates API-compatible JSON data for allowed mentions.
|
|
8611
|
+
*/
|
|
8612
|
+
declare class AllowedMentionsBuilder implements JSONEncodable<APIAllowedMentions> {
|
|
8613
|
+
private readonly data;
|
|
8614
|
+
/**
|
|
8615
|
+
* Creates new allowed mention builder from API data.
|
|
8616
|
+
*
|
|
8617
|
+
* @param data - The API data to create this attachment with
|
|
8618
|
+
*/
|
|
8619
|
+
constructor(data?: Partial<APIAllowedMentions>);
|
|
8620
|
+
/**
|
|
8621
|
+
* Sets the types of mentions to parse from the content.
|
|
8622
|
+
*
|
|
8623
|
+
* @param parse - The types of mentions to parse from the content
|
|
8624
|
+
*/
|
|
8625
|
+
setParse(...parse: RestOrArray<AllowedMentionsTypes>): this;
|
|
8626
|
+
/**
|
|
8627
|
+
* Sets the roles to mention.
|
|
8628
|
+
*
|
|
8629
|
+
* @param roles - The roles to mention
|
|
8630
|
+
*/
|
|
8631
|
+
setRoles(...roles: RestOrArray<Snowflake>): this;
|
|
8632
|
+
/**
|
|
8633
|
+
* Adds roles to mention.
|
|
8634
|
+
*
|
|
8635
|
+
* @param roles - The roles to mention
|
|
8636
|
+
*/
|
|
8637
|
+
addRoles(...roles: RestOrArray<Snowflake>): this;
|
|
8638
|
+
/**
|
|
8639
|
+
* Removes, replaces, or inserts roles.
|
|
8640
|
+
*
|
|
8641
|
+
* @remarks
|
|
8642
|
+
* This method behaves similarly
|
|
8643
|
+
* to {@link https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array/splice | Array.prototype.splice()}.
|
|
8644
|
+
*
|
|
8645
|
+
* It's useful for modifying and adjusting order of the already-existing roles.
|
|
8646
|
+
* @example
|
|
8647
|
+
* Remove the first role:
|
|
8648
|
+
* ```ts
|
|
8649
|
+
* allowedMentions.spliceRoles(0, 1);
|
|
8650
|
+
* ```
|
|
8651
|
+
* @example
|
|
8652
|
+
* Remove the first n role:
|
|
8653
|
+
* ```ts
|
|
8654
|
+
* const n = 4;
|
|
8655
|
+
* allowedMentions.spliceRoles(0, n);
|
|
8656
|
+
* ```
|
|
8657
|
+
* @example
|
|
8658
|
+
* Remove the last role:
|
|
8659
|
+
* ```ts
|
|
8660
|
+
* allowedMentions.spliceRoles(-1, 1);
|
|
8661
|
+
* ```
|
|
8662
|
+
* @param index - The index to start at
|
|
8663
|
+
* @param deleteCount - The number of roles to remove
|
|
8664
|
+
* @param roles - The replacing role ids
|
|
8665
|
+
*/
|
|
8666
|
+
spliceRoles(index: number, deleteCount: number, ...roles: RestOrArray<Snowflake>): this;
|
|
8667
|
+
/**
|
|
8668
|
+
* Sets the users to mention.
|
|
8669
|
+
*
|
|
8670
|
+
* @param users - The users to mention
|
|
8671
|
+
*/
|
|
8672
|
+
setUsers(...users: RestOrArray<Snowflake>): this;
|
|
8673
|
+
/**
|
|
8674
|
+
* Adds users to mention.
|
|
8675
|
+
*
|
|
8676
|
+
* @param users - The users to mention
|
|
8677
|
+
*/
|
|
8678
|
+
addUsers(...users: RestOrArray<Snowflake>): this;
|
|
8679
|
+
/**
|
|
8680
|
+
* Removes, replaces, or inserts users.
|
|
8681
|
+
*
|
|
8682
|
+
* @remarks
|
|
8683
|
+
* This method behaves similarly
|
|
8684
|
+
* to {@link https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array/splice | Array.prototype.splice()}.
|
|
8685
|
+
*
|
|
8686
|
+
* It's useful for modifying and adjusting order of the already-existing users.
|
|
8687
|
+
* @example
|
|
8688
|
+
* Remove the first user:
|
|
8689
|
+
* ```ts
|
|
8690
|
+
* allowedMentions.spliceUsers(0, 1);
|
|
8691
|
+
* ```
|
|
8692
|
+
* @example
|
|
8693
|
+
* Remove the first n user:
|
|
8694
|
+
* ```ts
|
|
8695
|
+
* const n = 4;
|
|
8696
|
+
* allowedMentions.spliceUsers(0, n);
|
|
8697
|
+
* ```
|
|
8698
|
+
* @example
|
|
8699
|
+
* Remove the last user:
|
|
8700
|
+
* ```ts
|
|
8701
|
+
* allowedMentions.spliceUsers(-1, 1);
|
|
8702
|
+
* ```
|
|
8703
|
+
* @param index - The index to start at
|
|
8704
|
+
* @param deleteCount - The number of users to remove
|
|
8705
|
+
* @param users - The replacing user ids
|
|
8706
|
+
*/
|
|
8707
|
+
spliceUsers(index: number, deleteCount: number, ...users: RestOrArray<Snowflake>): this;
|
|
8708
|
+
/**
|
|
8709
|
+
* For replies, sets whether to mention the author of the message being replied to
|
|
8710
|
+
*/
|
|
8711
|
+
setRepliedUser(repliedUser?: boolean): this;
|
|
8712
|
+
/**
|
|
8713
|
+
* Serializes this builder to API-compatible JSON data.
|
|
8714
|
+
*
|
|
8715
|
+
* Note that by disabling validation, there is no guarantee that the resulting object will be valid.
|
|
8716
|
+
*
|
|
8717
|
+
* @param validationOverride - Force validation to run/not run regardless of your global preference
|
|
8718
|
+
*/
|
|
8719
|
+
toJSON(validationOverride?: boolean): APIAllowedMentions;
|
|
8720
|
+
}
|
|
8721
|
+
|
|
8722
|
+
declare const attachmentPredicate: z.ZodObject<{
|
|
8723
|
+
id: z.ZodUnion<[z.ZodString, z.ZodNumber]>;
|
|
8724
|
+
description: z.ZodOptional<z.ZodString>;
|
|
8725
|
+
duration_secs: z.ZodOptional<z.ZodNumber>;
|
|
8726
|
+
filename: z.ZodOptional<z.ZodString>;
|
|
8727
|
+
title: z.ZodOptional<z.ZodString>;
|
|
8728
|
+
waveform: z.ZodOptional<z.ZodString>;
|
|
8729
|
+
}, "strip", z.ZodTypeAny, {
|
|
8730
|
+
id: string | number;
|
|
8731
|
+
description?: string | undefined;
|
|
8732
|
+
title?: string | undefined;
|
|
8733
|
+
duration_secs?: number | undefined;
|
|
8734
|
+
filename?: string | undefined;
|
|
8735
|
+
waveform?: string | undefined;
|
|
8736
|
+
}, {
|
|
8737
|
+
id: string | number;
|
|
8738
|
+
description?: string | undefined;
|
|
8739
|
+
title?: string | undefined;
|
|
8740
|
+
duration_secs?: number | undefined;
|
|
8741
|
+
filename?: string | undefined;
|
|
8742
|
+
waveform?: string | undefined;
|
|
8743
|
+
}>;
|
|
8744
|
+
declare const allowedMentionPredicate: z.ZodObject<{
|
|
8745
|
+
parse: z.ZodOptional<z.ZodArray<z.ZodNativeEnum<typeof AllowedMentionsTypes>, "many">>;
|
|
8746
|
+
roles: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
8747
|
+
users: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
8748
|
+
replied_user: z.ZodOptional<z.ZodBoolean>;
|
|
8749
|
+
}, "strip", z.ZodTypeAny, {
|
|
8750
|
+
parse?: AllowedMentionsTypes[] | undefined;
|
|
8751
|
+
roles?: string[] | undefined;
|
|
8752
|
+
users?: string[] | undefined;
|
|
8753
|
+
replied_user?: boolean | undefined;
|
|
8754
|
+
}, {
|
|
8755
|
+
parse?: AllowedMentionsTypes[] | undefined;
|
|
8756
|
+
roles?: string[] | undefined;
|
|
8757
|
+
users?: string[] | undefined;
|
|
8758
|
+
replied_user?: boolean | undefined;
|
|
8759
|
+
}>;
|
|
8760
|
+
declare const messageReferencePredicate: z.ZodObject<{
|
|
8761
|
+
channel_id: z.ZodOptional<z.ZodString>;
|
|
8762
|
+
fail_if_not_exists: z.ZodOptional<z.ZodBoolean>;
|
|
8763
|
+
guild_id: z.ZodOptional<z.ZodString>;
|
|
8764
|
+
message_id: z.ZodString;
|
|
8765
|
+
type: z.ZodOptional<z.ZodNativeEnum<typeof MessageReferenceType>>;
|
|
8766
|
+
}, "strip", z.ZodTypeAny, {
|
|
8767
|
+
message_id: string;
|
|
8768
|
+
type?: MessageReferenceType | undefined;
|
|
8769
|
+
guild_id?: string | undefined;
|
|
8770
|
+
channel_id?: string | undefined;
|
|
8771
|
+
fail_if_not_exists?: boolean | undefined;
|
|
8772
|
+
}, {
|
|
8773
|
+
message_id: string;
|
|
8774
|
+
type?: MessageReferenceType | undefined;
|
|
8775
|
+
guild_id?: string | undefined;
|
|
8776
|
+
channel_id?: string | undefined;
|
|
8777
|
+
fail_if_not_exists?: boolean | undefined;
|
|
8778
|
+
}>;
|
|
8779
|
+
declare const messagePredicate: z.ZodEffects<z.ZodObject<{
|
|
8780
|
+
content: z.ZodOptional<z.ZodString>;
|
|
8781
|
+
nonce: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
|
|
8782
|
+
tts: z.ZodOptional<z.ZodBoolean>;
|
|
8783
|
+
embeds: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodEffects<z.ZodObject<{
|
|
8784
|
+
title: z.ZodOptional<z.ZodString>;
|
|
8785
|
+
description: z.ZodOptional<z.ZodString>;
|
|
8786
|
+
url: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
|
|
8787
|
+
timestamp: z.ZodOptional<z.ZodString>;
|
|
8788
|
+
color: z.ZodOptional<z.ZodNumber>;
|
|
8789
|
+
footer: z.ZodOptional<z.ZodObject<{
|
|
8790
|
+
text: z.ZodString;
|
|
8791
|
+
icon_url: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
|
|
8792
|
+
}, "strip", z.ZodTypeAny, {
|
|
8793
|
+
text: string;
|
|
8794
|
+
icon_url?: string | undefined;
|
|
8795
|
+
}, {
|
|
8796
|
+
text: string;
|
|
8797
|
+
icon_url?: string | undefined;
|
|
8798
|
+
}>>;
|
|
8799
|
+
image: z.ZodOptional<z.ZodObject<{
|
|
8800
|
+
url: z.ZodEffects<z.ZodString, string, string>;
|
|
8801
|
+
}, "strip", z.ZodTypeAny, {
|
|
8802
|
+
url: string;
|
|
8803
|
+
}, {
|
|
8804
|
+
url: string;
|
|
8805
|
+
}>>;
|
|
8806
|
+
thumbnail: z.ZodOptional<z.ZodObject<{
|
|
8807
|
+
url: z.ZodEffects<z.ZodString, string, string>;
|
|
8808
|
+
}, "strip", z.ZodTypeAny, {
|
|
8809
|
+
url: string;
|
|
8810
|
+
}, {
|
|
8811
|
+
url: string;
|
|
8812
|
+
}>>;
|
|
8813
|
+
author: z.ZodOptional<z.ZodObject<{
|
|
8814
|
+
name: z.ZodString;
|
|
8815
|
+
icon_url: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
|
|
8816
|
+
url: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
|
|
8817
|
+
}, "strip", z.ZodTypeAny, {
|
|
8818
|
+
name: string;
|
|
8819
|
+
url?: string | undefined;
|
|
8820
|
+
icon_url?: string | undefined;
|
|
8821
|
+
}, {
|
|
8822
|
+
name: string;
|
|
8823
|
+
url?: string | undefined;
|
|
8824
|
+
icon_url?: string | undefined;
|
|
8825
|
+
}>>;
|
|
8826
|
+
fields: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
8827
|
+
name: z.ZodString;
|
|
8828
|
+
value: z.ZodString;
|
|
8829
|
+
inline: z.ZodOptional<z.ZodBoolean>;
|
|
8830
|
+
}, "strip", z.ZodTypeAny, {
|
|
8831
|
+
value: string;
|
|
8832
|
+
name: string;
|
|
8833
|
+
inline?: boolean | undefined;
|
|
8834
|
+
}, {
|
|
8835
|
+
value: string;
|
|
8836
|
+
name: string;
|
|
8837
|
+
inline?: boolean | undefined;
|
|
8838
|
+
}>, "many">>;
|
|
8839
|
+
}, "strip", z.ZodTypeAny, {
|
|
8840
|
+
url?: string | undefined;
|
|
8841
|
+
description?: string | undefined;
|
|
8842
|
+
title?: string | undefined;
|
|
8843
|
+
timestamp?: string | undefined;
|
|
8844
|
+
color?: number | undefined;
|
|
8845
|
+
footer?: {
|
|
8846
|
+
text: string;
|
|
8847
|
+
icon_url?: string | undefined;
|
|
8848
|
+
} | undefined;
|
|
8849
|
+
image?: {
|
|
8850
|
+
url: string;
|
|
8851
|
+
} | undefined;
|
|
8852
|
+
thumbnail?: {
|
|
8853
|
+
url: string;
|
|
8854
|
+
} | undefined;
|
|
8855
|
+
author?: {
|
|
8856
|
+
name: string;
|
|
8857
|
+
url?: string | undefined;
|
|
8858
|
+
icon_url?: string | undefined;
|
|
8859
|
+
} | undefined;
|
|
8860
|
+
fields?: {
|
|
8861
|
+
value: string;
|
|
8862
|
+
name: string;
|
|
8863
|
+
inline?: boolean | undefined;
|
|
8864
|
+
}[] | undefined;
|
|
8865
|
+
}, {
|
|
8866
|
+
url?: string | undefined;
|
|
8867
|
+
description?: string | undefined;
|
|
8868
|
+
title?: string | undefined;
|
|
8869
|
+
timestamp?: string | undefined;
|
|
8870
|
+
color?: number | undefined;
|
|
8871
|
+
footer?: {
|
|
8872
|
+
text: string;
|
|
8873
|
+
icon_url?: string | undefined;
|
|
8874
|
+
} | undefined;
|
|
8875
|
+
image?: {
|
|
8876
|
+
url: string;
|
|
8877
|
+
} | undefined;
|
|
8878
|
+
thumbnail?: {
|
|
8879
|
+
url: string;
|
|
8880
|
+
} | undefined;
|
|
8881
|
+
author?: {
|
|
8882
|
+
name: string;
|
|
8883
|
+
url?: string | undefined;
|
|
8884
|
+
icon_url?: string | undefined;
|
|
8885
|
+
} | undefined;
|
|
8886
|
+
fields?: {
|
|
8887
|
+
value: string;
|
|
8888
|
+
name: string;
|
|
8889
|
+
inline?: boolean | undefined;
|
|
8890
|
+
}[] | undefined;
|
|
8891
|
+
}>, {
|
|
8892
|
+
url?: string | undefined;
|
|
8893
|
+
description?: string | undefined;
|
|
8894
|
+
title?: string | undefined;
|
|
8895
|
+
timestamp?: string | undefined;
|
|
8896
|
+
color?: number | undefined;
|
|
8897
|
+
footer?: {
|
|
8898
|
+
text: string;
|
|
8899
|
+
icon_url?: string | undefined;
|
|
8900
|
+
} | undefined;
|
|
8901
|
+
image?: {
|
|
8902
|
+
url: string;
|
|
8903
|
+
} | undefined;
|
|
8904
|
+
thumbnail?: {
|
|
8905
|
+
url: string;
|
|
8906
|
+
} | undefined;
|
|
8907
|
+
author?: {
|
|
8908
|
+
name: string;
|
|
8909
|
+
url?: string | undefined;
|
|
8910
|
+
icon_url?: string | undefined;
|
|
8911
|
+
} | undefined;
|
|
8912
|
+
fields?: {
|
|
8913
|
+
value: string;
|
|
8914
|
+
name: string;
|
|
8915
|
+
inline?: boolean | undefined;
|
|
8916
|
+
}[] | undefined;
|
|
8917
|
+
}, {
|
|
8918
|
+
url?: string | undefined;
|
|
8919
|
+
description?: string | undefined;
|
|
8920
|
+
title?: string | undefined;
|
|
8921
|
+
timestamp?: string | undefined;
|
|
8922
|
+
color?: number | undefined;
|
|
8923
|
+
footer?: {
|
|
8924
|
+
text: string;
|
|
8925
|
+
icon_url?: string | undefined;
|
|
8926
|
+
} | undefined;
|
|
8927
|
+
image?: {
|
|
8928
|
+
url: string;
|
|
8929
|
+
} | undefined;
|
|
8930
|
+
thumbnail?: {
|
|
8931
|
+
url: string;
|
|
8932
|
+
} | undefined;
|
|
8933
|
+
author?: {
|
|
8934
|
+
name: string;
|
|
8935
|
+
url?: string | undefined;
|
|
8936
|
+
icon_url?: string | undefined;
|
|
8937
|
+
} | undefined;
|
|
8938
|
+
fields?: {
|
|
8939
|
+
value: string;
|
|
8940
|
+
name: string;
|
|
8941
|
+
inline?: boolean | undefined;
|
|
8942
|
+
}[] | undefined;
|
|
8943
|
+
}>, {
|
|
8944
|
+
url?: string | undefined;
|
|
8945
|
+
description?: string | undefined;
|
|
8946
|
+
title?: string | undefined;
|
|
8947
|
+
timestamp?: string | undefined;
|
|
8948
|
+
color?: number | undefined;
|
|
8949
|
+
footer?: {
|
|
8950
|
+
text: string;
|
|
8951
|
+
icon_url?: string | undefined;
|
|
8952
|
+
} | undefined;
|
|
8953
|
+
image?: {
|
|
8954
|
+
url: string;
|
|
8955
|
+
} | undefined;
|
|
8956
|
+
thumbnail?: {
|
|
8957
|
+
url: string;
|
|
8958
|
+
} | undefined;
|
|
8959
|
+
author?: {
|
|
8960
|
+
name: string;
|
|
8961
|
+
url?: string | undefined;
|
|
8962
|
+
icon_url?: string | undefined;
|
|
8963
|
+
} | undefined;
|
|
8964
|
+
fields?: {
|
|
8965
|
+
value: string;
|
|
8966
|
+
name: string;
|
|
8967
|
+
inline?: boolean | undefined;
|
|
8968
|
+
}[] | undefined;
|
|
8969
|
+
}, {
|
|
8970
|
+
url?: string | undefined;
|
|
8971
|
+
description?: string | undefined;
|
|
8972
|
+
title?: string | undefined;
|
|
8973
|
+
timestamp?: string | undefined;
|
|
8974
|
+
color?: number | undefined;
|
|
8975
|
+
footer?: {
|
|
8976
|
+
text: string;
|
|
8977
|
+
icon_url?: string | undefined;
|
|
8978
|
+
} | undefined;
|
|
8979
|
+
image?: {
|
|
8980
|
+
url: string;
|
|
8981
|
+
} | undefined;
|
|
8982
|
+
thumbnail?: {
|
|
8983
|
+
url: string;
|
|
8984
|
+
} | undefined;
|
|
8985
|
+
author?: {
|
|
8986
|
+
name: string;
|
|
8987
|
+
url?: string | undefined;
|
|
8988
|
+
icon_url?: string | undefined;
|
|
8989
|
+
} | undefined;
|
|
8990
|
+
fields?: {
|
|
8991
|
+
value: string;
|
|
8992
|
+
name: string;
|
|
8993
|
+
inline?: boolean | undefined;
|
|
8994
|
+
}[] | undefined;
|
|
8995
|
+
}>, "many">>;
|
|
8996
|
+
allowed_mentions: z.ZodOptional<z.ZodObject<{
|
|
8997
|
+
parse: z.ZodOptional<z.ZodArray<z.ZodNativeEnum<typeof AllowedMentionsTypes>, "many">>;
|
|
8998
|
+
roles: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
8999
|
+
users: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
9000
|
+
replied_user: z.ZodOptional<z.ZodBoolean>;
|
|
9001
|
+
}, "strip", z.ZodTypeAny, {
|
|
9002
|
+
parse?: AllowedMentionsTypes[] | undefined;
|
|
9003
|
+
roles?: string[] | undefined;
|
|
9004
|
+
users?: string[] | undefined;
|
|
9005
|
+
replied_user?: boolean | undefined;
|
|
9006
|
+
}, {
|
|
9007
|
+
parse?: AllowedMentionsTypes[] | undefined;
|
|
9008
|
+
roles?: string[] | undefined;
|
|
9009
|
+
users?: string[] | undefined;
|
|
9010
|
+
replied_user?: boolean | undefined;
|
|
9011
|
+
}>>;
|
|
9012
|
+
message_reference: z.ZodOptional<z.ZodObject<{
|
|
9013
|
+
channel_id: z.ZodOptional<z.ZodString>;
|
|
9014
|
+
fail_if_not_exists: z.ZodOptional<z.ZodBoolean>;
|
|
9015
|
+
guild_id: z.ZodOptional<z.ZodString>;
|
|
9016
|
+
message_id: z.ZodString;
|
|
9017
|
+
type: z.ZodOptional<z.ZodNativeEnum<typeof MessageReferenceType>>;
|
|
9018
|
+
}, "strip", z.ZodTypeAny, {
|
|
9019
|
+
message_id: string;
|
|
9020
|
+
type?: MessageReferenceType | undefined;
|
|
9021
|
+
guild_id?: string | undefined;
|
|
9022
|
+
channel_id?: string | undefined;
|
|
9023
|
+
fail_if_not_exists?: boolean | undefined;
|
|
9024
|
+
}, {
|
|
9025
|
+
message_id: string;
|
|
9026
|
+
type?: MessageReferenceType | undefined;
|
|
9027
|
+
guild_id?: string | undefined;
|
|
9028
|
+
channel_id?: string | undefined;
|
|
9029
|
+
fail_if_not_exists?: boolean | undefined;
|
|
9030
|
+
}>>;
|
|
9031
|
+
components: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
9032
|
+
type: z.ZodLiteral<ComponentType.ActionRow>;
|
|
9033
|
+
components: z.ZodArray<z.ZodObject<{
|
|
9034
|
+
type: z.ZodUnion<[z.ZodLiteral<ComponentType.Button>, z.ZodLiteral<ComponentType.ChannelSelect>, z.ZodLiteral<ComponentType.MentionableSelect>, z.ZodLiteral<ComponentType.RoleSelect>, z.ZodLiteral<ComponentType.StringSelect>, z.ZodLiteral<ComponentType.UserSelect>]>;
|
|
9035
|
+
}, "strip", z.ZodTypeAny, {
|
|
9036
|
+
type: ComponentType.Button | ComponentType.StringSelect | ComponentType.UserSelect | ComponentType.RoleSelect | ComponentType.MentionableSelect | ComponentType.ChannelSelect;
|
|
9037
|
+
}, {
|
|
9038
|
+
type: ComponentType.Button | ComponentType.StringSelect | ComponentType.UserSelect | ComponentType.RoleSelect | ComponentType.MentionableSelect | ComponentType.ChannelSelect;
|
|
9039
|
+
}>, "many">;
|
|
9040
|
+
}, "strip", z.ZodTypeAny, {
|
|
9041
|
+
type: ComponentType.ActionRow;
|
|
9042
|
+
components: {
|
|
9043
|
+
type: ComponentType.Button | ComponentType.StringSelect | ComponentType.UserSelect | ComponentType.RoleSelect | ComponentType.MentionableSelect | ComponentType.ChannelSelect;
|
|
9044
|
+
}[];
|
|
9045
|
+
}, {
|
|
9046
|
+
type: ComponentType.ActionRow;
|
|
9047
|
+
components: {
|
|
9048
|
+
type: ComponentType.Button | ComponentType.StringSelect | ComponentType.UserSelect | ComponentType.RoleSelect | ComponentType.MentionableSelect | ComponentType.ChannelSelect;
|
|
9049
|
+
}[];
|
|
9050
|
+
}>, "many">>;
|
|
9051
|
+
sticker_ids: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
9052
|
+
attachments: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
9053
|
+
id: z.ZodUnion<[z.ZodString, z.ZodNumber]>;
|
|
9054
|
+
description: z.ZodOptional<z.ZodString>;
|
|
9055
|
+
duration_secs: z.ZodOptional<z.ZodNumber>;
|
|
9056
|
+
filename: z.ZodOptional<z.ZodString>;
|
|
9057
|
+
title: z.ZodOptional<z.ZodString>;
|
|
9058
|
+
waveform: z.ZodOptional<z.ZodString>;
|
|
9059
|
+
}, "strip", z.ZodTypeAny, {
|
|
9060
|
+
id: string | number;
|
|
9061
|
+
description?: string | undefined;
|
|
9062
|
+
title?: string | undefined;
|
|
9063
|
+
duration_secs?: number | undefined;
|
|
9064
|
+
filename?: string | undefined;
|
|
9065
|
+
waveform?: string | undefined;
|
|
9066
|
+
}, {
|
|
9067
|
+
id: string | number;
|
|
9068
|
+
description?: string | undefined;
|
|
9069
|
+
title?: string | undefined;
|
|
9070
|
+
duration_secs?: number | undefined;
|
|
9071
|
+
filename?: string | undefined;
|
|
9072
|
+
waveform?: string | undefined;
|
|
9073
|
+
}>, "many">>;
|
|
9074
|
+
flags: z.ZodOptional<z.ZodNumber>;
|
|
9075
|
+
enforce_nonce: z.ZodOptional<z.ZodBoolean>;
|
|
9076
|
+
poll: z.ZodOptional<z.ZodObject<{
|
|
9077
|
+
question: z.ZodObject<{
|
|
9078
|
+
text: z.ZodString;
|
|
9079
|
+
}, "strip", z.ZodTypeAny, {
|
|
9080
|
+
text: string;
|
|
9081
|
+
}, {
|
|
9082
|
+
text: string;
|
|
9083
|
+
}>;
|
|
9084
|
+
answers: z.ZodArray<z.ZodObject<{
|
|
9085
|
+
poll_media: z.ZodObject<{
|
|
9086
|
+
text: z.ZodString;
|
|
9087
|
+
emoji: z.ZodOptional<z.ZodEffects<z.ZodObject<{
|
|
9088
|
+
id: z.ZodOptional<z.ZodString>;
|
|
9089
|
+
name: z.ZodOptional<z.ZodString>;
|
|
9090
|
+
animated: z.ZodOptional<z.ZodBoolean>;
|
|
9091
|
+
}, "strict", z.ZodTypeAny, {
|
|
9092
|
+
id?: string | undefined;
|
|
9093
|
+
name?: string | undefined;
|
|
9094
|
+
animated?: boolean | undefined;
|
|
9095
|
+
}, {
|
|
9096
|
+
id?: string | undefined;
|
|
9097
|
+
name?: string | undefined;
|
|
9098
|
+
animated?: boolean | undefined;
|
|
9099
|
+
}>, {
|
|
9100
|
+
id?: string | undefined;
|
|
9101
|
+
name?: string | undefined;
|
|
9102
|
+
animated?: boolean | undefined;
|
|
9103
|
+
}, {
|
|
9104
|
+
id?: string | undefined;
|
|
9105
|
+
name?: string | undefined;
|
|
9106
|
+
animated?: boolean | undefined;
|
|
9107
|
+
}>>;
|
|
9108
|
+
}, "strip", z.ZodTypeAny, {
|
|
9109
|
+
text: string;
|
|
9110
|
+
emoji?: {
|
|
9111
|
+
id?: string | undefined;
|
|
9112
|
+
name?: string | undefined;
|
|
9113
|
+
animated?: boolean | undefined;
|
|
9114
|
+
} | undefined;
|
|
9115
|
+
}, {
|
|
9116
|
+
text: string;
|
|
9117
|
+
emoji?: {
|
|
9118
|
+
id?: string | undefined;
|
|
9119
|
+
name?: string | undefined;
|
|
9120
|
+
animated?: boolean | undefined;
|
|
9121
|
+
} | undefined;
|
|
9122
|
+
}>;
|
|
9123
|
+
}, "strip", z.ZodTypeAny, {
|
|
9124
|
+
poll_media: {
|
|
9125
|
+
text: string;
|
|
9126
|
+
emoji?: {
|
|
9127
|
+
id?: string | undefined;
|
|
9128
|
+
name?: string | undefined;
|
|
9129
|
+
animated?: boolean | undefined;
|
|
9130
|
+
} | undefined;
|
|
9131
|
+
};
|
|
9132
|
+
}, {
|
|
9133
|
+
poll_media: {
|
|
9134
|
+
text: string;
|
|
9135
|
+
emoji?: {
|
|
9136
|
+
id?: string | undefined;
|
|
9137
|
+
name?: string | undefined;
|
|
9138
|
+
animated?: boolean | undefined;
|
|
9139
|
+
} | undefined;
|
|
9140
|
+
};
|
|
9141
|
+
}>, "many">;
|
|
9142
|
+
duration: z.ZodOptional<z.ZodNumber>;
|
|
9143
|
+
allow_multiselect: z.ZodOptional<z.ZodBoolean>;
|
|
9144
|
+
layout_type: z.ZodOptional<z.ZodNativeEnum<typeof discord_api_types_v10.PollLayoutType>>;
|
|
9145
|
+
}, "strip", z.ZodTypeAny, {
|
|
9146
|
+
question: {
|
|
9147
|
+
text: string;
|
|
9148
|
+
};
|
|
9149
|
+
answers: {
|
|
9150
|
+
poll_media: {
|
|
9151
|
+
text: string;
|
|
9152
|
+
emoji?: {
|
|
9153
|
+
id?: string | undefined;
|
|
9154
|
+
name?: string | undefined;
|
|
9155
|
+
animated?: boolean | undefined;
|
|
9156
|
+
} | undefined;
|
|
9157
|
+
};
|
|
9158
|
+
}[];
|
|
9159
|
+
duration?: number | undefined;
|
|
9160
|
+
allow_multiselect?: boolean | undefined;
|
|
9161
|
+
layout_type?: discord_api_types_v10.PollLayoutType | undefined;
|
|
9162
|
+
}, {
|
|
9163
|
+
question: {
|
|
9164
|
+
text: string;
|
|
9165
|
+
};
|
|
9166
|
+
answers: {
|
|
9167
|
+
poll_media: {
|
|
9168
|
+
text: string;
|
|
9169
|
+
emoji?: {
|
|
9170
|
+
id?: string | undefined;
|
|
9171
|
+
name?: string | undefined;
|
|
9172
|
+
animated?: boolean | undefined;
|
|
9173
|
+
} | undefined;
|
|
9174
|
+
};
|
|
9175
|
+
}[];
|
|
9176
|
+
duration?: number | undefined;
|
|
9177
|
+
allow_multiselect?: boolean | undefined;
|
|
9178
|
+
layout_type?: discord_api_types_v10.PollLayoutType | undefined;
|
|
9179
|
+
}>>;
|
|
9180
|
+
}, "strip", z.ZodTypeAny, {
|
|
9181
|
+
components?: {
|
|
9182
|
+
type: ComponentType.ActionRow;
|
|
9183
|
+
components: {
|
|
9184
|
+
type: ComponentType.Button | ComponentType.StringSelect | ComponentType.UserSelect | ComponentType.RoleSelect | ComponentType.MentionableSelect | ComponentType.ChannelSelect;
|
|
9185
|
+
}[];
|
|
9186
|
+
}[] | undefined;
|
|
9187
|
+
content?: string | undefined;
|
|
9188
|
+
nonce?: string | number | undefined;
|
|
9189
|
+
tts?: boolean | undefined;
|
|
9190
|
+
embeds?: {
|
|
9191
|
+
url?: string | undefined;
|
|
9192
|
+
description?: string | undefined;
|
|
9193
|
+
title?: string | undefined;
|
|
9194
|
+
timestamp?: string | undefined;
|
|
9195
|
+
color?: number | undefined;
|
|
9196
|
+
footer?: {
|
|
9197
|
+
text: string;
|
|
9198
|
+
icon_url?: string | undefined;
|
|
9199
|
+
} | undefined;
|
|
9200
|
+
image?: {
|
|
9201
|
+
url: string;
|
|
9202
|
+
} | undefined;
|
|
9203
|
+
thumbnail?: {
|
|
9204
|
+
url: string;
|
|
9205
|
+
} | undefined;
|
|
9206
|
+
author?: {
|
|
9207
|
+
name: string;
|
|
9208
|
+
url?: string | undefined;
|
|
9209
|
+
icon_url?: string | undefined;
|
|
9210
|
+
} | undefined;
|
|
9211
|
+
fields?: {
|
|
9212
|
+
value: string;
|
|
9213
|
+
name: string;
|
|
9214
|
+
inline?: boolean | undefined;
|
|
9215
|
+
}[] | undefined;
|
|
9216
|
+
}[] | undefined;
|
|
9217
|
+
allowed_mentions?: {
|
|
9218
|
+
parse?: AllowedMentionsTypes[] | undefined;
|
|
9219
|
+
roles?: string[] | undefined;
|
|
9220
|
+
users?: string[] | undefined;
|
|
9221
|
+
replied_user?: boolean | undefined;
|
|
9222
|
+
} | undefined;
|
|
9223
|
+
message_reference?: {
|
|
9224
|
+
message_id: string;
|
|
9225
|
+
type?: MessageReferenceType | undefined;
|
|
9226
|
+
guild_id?: string | undefined;
|
|
9227
|
+
channel_id?: string | undefined;
|
|
9228
|
+
fail_if_not_exists?: boolean | undefined;
|
|
9229
|
+
} | undefined;
|
|
9230
|
+
sticker_ids?: string[] | undefined;
|
|
9231
|
+
attachments?: {
|
|
9232
|
+
id: string | number;
|
|
9233
|
+
description?: string | undefined;
|
|
9234
|
+
title?: string | undefined;
|
|
9235
|
+
duration_secs?: number | undefined;
|
|
9236
|
+
filename?: string | undefined;
|
|
9237
|
+
waveform?: string | undefined;
|
|
9238
|
+
}[] | undefined;
|
|
9239
|
+
flags?: number | undefined;
|
|
9240
|
+
enforce_nonce?: boolean | undefined;
|
|
9241
|
+
poll?: {
|
|
9242
|
+
question: {
|
|
9243
|
+
text: string;
|
|
9244
|
+
};
|
|
9245
|
+
answers: {
|
|
9246
|
+
poll_media: {
|
|
9247
|
+
text: string;
|
|
9248
|
+
emoji?: {
|
|
9249
|
+
id?: string | undefined;
|
|
9250
|
+
name?: string | undefined;
|
|
9251
|
+
animated?: boolean | undefined;
|
|
9252
|
+
} | undefined;
|
|
9253
|
+
};
|
|
9254
|
+
}[];
|
|
9255
|
+
duration?: number | undefined;
|
|
9256
|
+
allow_multiselect?: boolean | undefined;
|
|
9257
|
+
layout_type?: discord_api_types_v10.PollLayoutType | undefined;
|
|
9258
|
+
} | undefined;
|
|
9259
|
+
}, {
|
|
9260
|
+
components?: {
|
|
9261
|
+
type: ComponentType.ActionRow;
|
|
9262
|
+
components: {
|
|
9263
|
+
type: ComponentType.Button | ComponentType.StringSelect | ComponentType.UserSelect | ComponentType.RoleSelect | ComponentType.MentionableSelect | ComponentType.ChannelSelect;
|
|
9264
|
+
}[];
|
|
9265
|
+
}[] | undefined;
|
|
9266
|
+
content?: string | undefined;
|
|
9267
|
+
nonce?: string | number | undefined;
|
|
9268
|
+
tts?: boolean | undefined;
|
|
9269
|
+
embeds?: {
|
|
9270
|
+
url?: string | undefined;
|
|
9271
|
+
description?: string | undefined;
|
|
9272
|
+
title?: string | undefined;
|
|
9273
|
+
timestamp?: string | undefined;
|
|
9274
|
+
color?: number | undefined;
|
|
9275
|
+
footer?: {
|
|
9276
|
+
text: string;
|
|
9277
|
+
icon_url?: string | undefined;
|
|
9278
|
+
} | undefined;
|
|
9279
|
+
image?: {
|
|
9280
|
+
url: string;
|
|
9281
|
+
} | undefined;
|
|
9282
|
+
thumbnail?: {
|
|
9283
|
+
url: string;
|
|
9284
|
+
} | undefined;
|
|
9285
|
+
author?: {
|
|
9286
|
+
name: string;
|
|
9287
|
+
url?: string | undefined;
|
|
9288
|
+
icon_url?: string | undefined;
|
|
9289
|
+
} | undefined;
|
|
9290
|
+
fields?: {
|
|
9291
|
+
value: string;
|
|
9292
|
+
name: string;
|
|
9293
|
+
inline?: boolean | undefined;
|
|
9294
|
+
}[] | undefined;
|
|
9295
|
+
}[] | undefined;
|
|
9296
|
+
allowed_mentions?: {
|
|
9297
|
+
parse?: AllowedMentionsTypes[] | undefined;
|
|
9298
|
+
roles?: string[] | undefined;
|
|
9299
|
+
users?: string[] | undefined;
|
|
9300
|
+
replied_user?: boolean | undefined;
|
|
9301
|
+
} | undefined;
|
|
9302
|
+
message_reference?: {
|
|
9303
|
+
message_id: string;
|
|
9304
|
+
type?: MessageReferenceType | undefined;
|
|
9305
|
+
guild_id?: string | undefined;
|
|
9306
|
+
channel_id?: string | undefined;
|
|
9307
|
+
fail_if_not_exists?: boolean | undefined;
|
|
9308
|
+
} | undefined;
|
|
9309
|
+
sticker_ids?: string[] | undefined;
|
|
9310
|
+
attachments?: {
|
|
9311
|
+
id: string | number;
|
|
9312
|
+
description?: string | undefined;
|
|
9313
|
+
title?: string | undefined;
|
|
9314
|
+
duration_secs?: number | undefined;
|
|
9315
|
+
filename?: string | undefined;
|
|
9316
|
+
waveform?: string | undefined;
|
|
9317
|
+
}[] | undefined;
|
|
9318
|
+
flags?: number | undefined;
|
|
9319
|
+
enforce_nonce?: boolean | undefined;
|
|
9320
|
+
poll?: {
|
|
9321
|
+
question: {
|
|
9322
|
+
text: string;
|
|
9323
|
+
};
|
|
9324
|
+
answers: {
|
|
9325
|
+
poll_media: {
|
|
9326
|
+
text: string;
|
|
9327
|
+
emoji?: {
|
|
9328
|
+
id?: string | undefined;
|
|
9329
|
+
name?: string | undefined;
|
|
9330
|
+
animated?: boolean | undefined;
|
|
9331
|
+
} | undefined;
|
|
9332
|
+
};
|
|
9333
|
+
}[];
|
|
9334
|
+
duration?: number | undefined;
|
|
9335
|
+
allow_multiselect?: boolean | undefined;
|
|
9336
|
+
layout_type?: discord_api_types_v10.PollLayoutType | undefined;
|
|
9337
|
+
} | undefined;
|
|
9338
|
+
}>, {
|
|
9339
|
+
components?: {
|
|
9340
|
+
type: ComponentType.ActionRow;
|
|
9341
|
+
components: {
|
|
9342
|
+
type: ComponentType.Button | ComponentType.StringSelect | ComponentType.UserSelect | ComponentType.RoleSelect | ComponentType.MentionableSelect | ComponentType.ChannelSelect;
|
|
9343
|
+
}[];
|
|
9344
|
+
}[] | undefined;
|
|
9345
|
+
content?: string | undefined;
|
|
9346
|
+
nonce?: string | number | undefined;
|
|
9347
|
+
tts?: boolean | undefined;
|
|
9348
|
+
embeds?: {
|
|
9349
|
+
url?: string | undefined;
|
|
9350
|
+
description?: string | undefined;
|
|
9351
|
+
title?: string | undefined;
|
|
9352
|
+
timestamp?: string | undefined;
|
|
9353
|
+
color?: number | undefined;
|
|
9354
|
+
footer?: {
|
|
9355
|
+
text: string;
|
|
9356
|
+
icon_url?: string | undefined;
|
|
9357
|
+
} | undefined;
|
|
9358
|
+
image?: {
|
|
9359
|
+
url: string;
|
|
9360
|
+
} | undefined;
|
|
9361
|
+
thumbnail?: {
|
|
9362
|
+
url: string;
|
|
9363
|
+
} | undefined;
|
|
9364
|
+
author?: {
|
|
9365
|
+
name: string;
|
|
9366
|
+
url?: string | undefined;
|
|
9367
|
+
icon_url?: string | undefined;
|
|
9368
|
+
} | undefined;
|
|
9369
|
+
fields?: {
|
|
9370
|
+
value: string;
|
|
9371
|
+
name: string;
|
|
9372
|
+
inline?: boolean | undefined;
|
|
9373
|
+
}[] | undefined;
|
|
9374
|
+
}[] | undefined;
|
|
9375
|
+
allowed_mentions?: {
|
|
9376
|
+
parse?: AllowedMentionsTypes[] | undefined;
|
|
9377
|
+
roles?: string[] | undefined;
|
|
9378
|
+
users?: string[] | undefined;
|
|
9379
|
+
replied_user?: boolean | undefined;
|
|
9380
|
+
} | undefined;
|
|
9381
|
+
message_reference?: {
|
|
9382
|
+
message_id: string;
|
|
9383
|
+
type?: MessageReferenceType | undefined;
|
|
9384
|
+
guild_id?: string | undefined;
|
|
9385
|
+
channel_id?: string | undefined;
|
|
9386
|
+
fail_if_not_exists?: boolean | undefined;
|
|
9387
|
+
} | undefined;
|
|
9388
|
+
sticker_ids?: string[] | undefined;
|
|
9389
|
+
attachments?: {
|
|
9390
|
+
id: string | number;
|
|
9391
|
+
description?: string | undefined;
|
|
9392
|
+
title?: string | undefined;
|
|
9393
|
+
duration_secs?: number | undefined;
|
|
9394
|
+
filename?: string | undefined;
|
|
9395
|
+
waveform?: string | undefined;
|
|
9396
|
+
}[] | undefined;
|
|
9397
|
+
flags?: number | undefined;
|
|
9398
|
+
enforce_nonce?: boolean | undefined;
|
|
9399
|
+
poll?: {
|
|
9400
|
+
question: {
|
|
9401
|
+
text: string;
|
|
9402
|
+
};
|
|
9403
|
+
answers: {
|
|
9404
|
+
poll_media: {
|
|
9405
|
+
text: string;
|
|
9406
|
+
emoji?: {
|
|
9407
|
+
id?: string | undefined;
|
|
9408
|
+
name?: string | undefined;
|
|
9409
|
+
animated?: boolean | undefined;
|
|
9410
|
+
} | undefined;
|
|
9411
|
+
};
|
|
9412
|
+
}[];
|
|
9413
|
+
duration?: number | undefined;
|
|
9414
|
+
allow_multiselect?: boolean | undefined;
|
|
9415
|
+
layout_type?: discord_api_types_v10.PollLayoutType | undefined;
|
|
9416
|
+
} | undefined;
|
|
9417
|
+
}, {
|
|
9418
|
+
components?: {
|
|
9419
|
+
type: ComponentType.ActionRow;
|
|
9420
|
+
components: {
|
|
9421
|
+
type: ComponentType.Button | ComponentType.StringSelect | ComponentType.UserSelect | ComponentType.RoleSelect | ComponentType.MentionableSelect | ComponentType.ChannelSelect;
|
|
9422
|
+
}[];
|
|
9423
|
+
}[] | undefined;
|
|
9424
|
+
content?: string | undefined;
|
|
9425
|
+
nonce?: string | number | undefined;
|
|
9426
|
+
tts?: boolean | undefined;
|
|
9427
|
+
embeds?: {
|
|
9428
|
+
url?: string | undefined;
|
|
9429
|
+
description?: string | undefined;
|
|
9430
|
+
title?: string | undefined;
|
|
9431
|
+
timestamp?: string | undefined;
|
|
9432
|
+
color?: number | undefined;
|
|
9433
|
+
footer?: {
|
|
9434
|
+
text: string;
|
|
9435
|
+
icon_url?: string | undefined;
|
|
9436
|
+
} | undefined;
|
|
9437
|
+
image?: {
|
|
9438
|
+
url: string;
|
|
9439
|
+
} | undefined;
|
|
9440
|
+
thumbnail?: {
|
|
9441
|
+
url: string;
|
|
9442
|
+
} | undefined;
|
|
9443
|
+
author?: {
|
|
9444
|
+
name: string;
|
|
9445
|
+
url?: string | undefined;
|
|
9446
|
+
icon_url?: string | undefined;
|
|
9447
|
+
} | undefined;
|
|
9448
|
+
fields?: {
|
|
9449
|
+
value: string;
|
|
9450
|
+
name: string;
|
|
9451
|
+
inline?: boolean | undefined;
|
|
9452
|
+
}[] | undefined;
|
|
9453
|
+
}[] | undefined;
|
|
9454
|
+
allowed_mentions?: {
|
|
9455
|
+
parse?: AllowedMentionsTypes[] | undefined;
|
|
9456
|
+
roles?: string[] | undefined;
|
|
9457
|
+
users?: string[] | undefined;
|
|
9458
|
+
replied_user?: boolean | undefined;
|
|
9459
|
+
} | undefined;
|
|
9460
|
+
message_reference?: {
|
|
9461
|
+
message_id: string;
|
|
9462
|
+
type?: MessageReferenceType | undefined;
|
|
9463
|
+
guild_id?: string | undefined;
|
|
9464
|
+
channel_id?: string | undefined;
|
|
9465
|
+
fail_if_not_exists?: boolean | undefined;
|
|
9466
|
+
} | undefined;
|
|
9467
|
+
sticker_ids?: string[] | undefined;
|
|
9468
|
+
attachments?: {
|
|
9469
|
+
id: string | number;
|
|
9470
|
+
description?: string | undefined;
|
|
9471
|
+
title?: string | undefined;
|
|
9472
|
+
duration_secs?: number | undefined;
|
|
9473
|
+
filename?: string | undefined;
|
|
9474
|
+
waveform?: string | undefined;
|
|
9475
|
+
}[] | undefined;
|
|
9476
|
+
flags?: number | undefined;
|
|
9477
|
+
enforce_nonce?: boolean | undefined;
|
|
9478
|
+
poll?: {
|
|
9479
|
+
question: {
|
|
9480
|
+
text: string;
|
|
9481
|
+
};
|
|
9482
|
+
answers: {
|
|
9483
|
+
poll_media: {
|
|
9484
|
+
text: string;
|
|
9485
|
+
emoji?: {
|
|
9486
|
+
id?: string | undefined;
|
|
9487
|
+
name?: string | undefined;
|
|
9488
|
+
animated?: boolean | undefined;
|
|
9489
|
+
} | undefined;
|
|
9490
|
+
};
|
|
9491
|
+
}[];
|
|
9492
|
+
duration?: number | undefined;
|
|
9493
|
+
allow_multiselect?: boolean | undefined;
|
|
9494
|
+
layout_type?: discord_api_types_v10.PollLayoutType | undefined;
|
|
9495
|
+
} | undefined;
|
|
9496
|
+
}>;
|
|
9497
|
+
|
|
9498
|
+
/**
|
|
9499
|
+
* A builder that creates API-compatible JSON data for attachments.
|
|
9500
|
+
*/
|
|
9501
|
+
declare class AttachmentBuilder implements JSONEncodable<RESTAPIAttachment> {
|
|
9502
|
+
private readonly data;
|
|
9503
|
+
/**
|
|
9504
|
+
* Creates new attachment builder from API data.
|
|
9505
|
+
*
|
|
9506
|
+
* @param data - The API data to create this attachment with
|
|
9507
|
+
*/
|
|
9508
|
+
constructor(data?: Partial<RESTAPIAttachment>);
|
|
9509
|
+
/**
|
|
9510
|
+
* @param id - The id of the attachment
|
|
9511
|
+
*/
|
|
9512
|
+
setId(id: Snowflake): this;
|
|
9513
|
+
/**
|
|
9514
|
+
* Clears the id of this attachment.
|
|
9515
|
+
*/
|
|
9516
|
+
clearId(): this;
|
|
9517
|
+
/**
|
|
9518
|
+
* Sets the description of this attachment.
|
|
9519
|
+
*/
|
|
9520
|
+
setDescription(description: string): this;
|
|
9521
|
+
/**
|
|
9522
|
+
* Clears the description of this attachment.
|
|
9523
|
+
*/
|
|
9524
|
+
clearDescription(): this;
|
|
9525
|
+
/**
|
|
9526
|
+
* Sets the duration of this attachment (audio clips).
|
|
9527
|
+
*
|
|
9528
|
+
* @param duration - The duration of the attachment in seconds
|
|
9529
|
+
*/
|
|
9530
|
+
setDuration(duration: number): this;
|
|
9531
|
+
/**
|
|
9532
|
+
* Clears the duration of this attachment.
|
|
9533
|
+
*/
|
|
9534
|
+
clearDuration(): this;
|
|
9535
|
+
/**
|
|
9536
|
+
* Sets the filename of this attachment.
|
|
9537
|
+
*
|
|
9538
|
+
* @param filename - The filename of the attachment
|
|
9539
|
+
*/
|
|
9540
|
+
setFilename(filename: string): this;
|
|
9541
|
+
/**
|
|
9542
|
+
* Clears the filename of this attachment.
|
|
9543
|
+
*/
|
|
9544
|
+
clearFilename(): this;
|
|
9545
|
+
/**
|
|
9546
|
+
* Sets the title of this attachment.
|
|
9547
|
+
*
|
|
9548
|
+
* @param title - The title of the attachment
|
|
9549
|
+
*/
|
|
9550
|
+
setTitle(title: string): this;
|
|
9551
|
+
/**
|
|
9552
|
+
* Clears the title of this attachment.
|
|
9553
|
+
*/
|
|
9554
|
+
clearTitle(): this;
|
|
9555
|
+
/**
|
|
9556
|
+
* Sets the waveform of this attachment.
|
|
9557
|
+
*
|
|
9558
|
+
* @param waveform - The waveform of the attachment
|
|
9559
|
+
*/
|
|
9560
|
+
setWaveform(waveform: string): this;
|
|
9561
|
+
/**
|
|
9562
|
+
* Clears the waveform of this attachment.
|
|
9563
|
+
*/
|
|
9564
|
+
clearWaveform(): this;
|
|
9565
|
+
/**
|
|
9566
|
+
* Serializes this builder to API-compatible JSON data.
|
|
9567
|
+
*
|
|
9568
|
+
* Note that by disabling validation, there is no guarantee that the resulting object will be valid.
|
|
9569
|
+
*
|
|
9570
|
+
* @param validationOverride - Force validation to run/not run regardless of your global preference
|
|
9571
|
+
*/
|
|
9572
|
+
toJSON(validationOverride?: boolean): RESTAPIAttachment;
|
|
9573
|
+
}
|
|
9574
|
+
|
|
9575
|
+
interface MessageReferenceBuilderData extends Omit<APIMessageReference, 'message_id'> {
|
|
9576
|
+
message_id: Snowflake;
|
|
9577
|
+
}
|
|
9578
|
+
/**
|
|
9579
|
+
* A builder that creates API-compatible JSON data for message references.
|
|
9580
|
+
*/
|
|
9581
|
+
declare class MessageReferenceBuilder implements JSONEncodable<MessageReferenceBuilderData> {
|
|
9582
|
+
private readonly data;
|
|
9583
|
+
/**
|
|
9584
|
+
* Creates new allowed mention builder from API data.
|
|
9585
|
+
*
|
|
9586
|
+
* @param data - The API data to create this attachment with
|
|
9587
|
+
*/
|
|
9588
|
+
constructor(data?: Partial<MessageReferenceBuilderData>);
|
|
9589
|
+
/**
|
|
9590
|
+
* Sets the types of message reference this represents
|
|
9591
|
+
*
|
|
9592
|
+
* @param type - The type of message reference
|
|
9593
|
+
*/
|
|
9594
|
+
setType(type: MessageReferenceType): this;
|
|
9595
|
+
/**
|
|
9596
|
+
* Clear the type of message reference this represents
|
|
9597
|
+
*/
|
|
9598
|
+
clearType(): this;
|
|
9599
|
+
/**
|
|
9600
|
+
* Sets the id of the message being referenced
|
|
9601
|
+
*
|
|
9602
|
+
* @param messageId - The id of the message being referenced
|
|
9603
|
+
*/
|
|
9604
|
+
setMessageId(messageId: Snowflake): this;
|
|
9605
|
+
/**
|
|
9606
|
+
* Sets the id of the channel being referenced
|
|
9607
|
+
*
|
|
9608
|
+
* @param channelId - The id of the channel being referenced
|
|
9609
|
+
*/
|
|
9610
|
+
setChannelId(channelId: Snowflake): this;
|
|
9611
|
+
/**
|
|
9612
|
+
* Clear the id of the channel being referenced
|
|
9613
|
+
*/
|
|
9614
|
+
clearChannelId(): this;
|
|
9615
|
+
/**
|
|
9616
|
+
* Sets the id of the guild being referenced
|
|
9617
|
+
*
|
|
9618
|
+
* @param guildId - The id of the guild being referenced
|
|
9619
|
+
*/
|
|
9620
|
+
setGuildId(guildId: Snowflake): this;
|
|
9621
|
+
/**
|
|
9622
|
+
* Clear the id of the guild being referenced
|
|
9623
|
+
*/
|
|
9624
|
+
clearGuildId(): this;
|
|
9625
|
+
/**
|
|
9626
|
+
* Serializes this builder to API-compatible JSON data.
|
|
9627
|
+
*
|
|
9628
|
+
* Note that by disabling validation, there is no guarantee that the resulting object will be valid.
|
|
9629
|
+
*
|
|
9630
|
+
* @param validationOverride - Force validation to run/not run regardless of your global preference
|
|
9631
|
+
*/
|
|
9632
|
+
toJSON(validationOverride?: boolean): MessageReferenceBuilderData;
|
|
9633
|
+
}
|
|
9634
|
+
|
|
9635
|
+
interface MessageBuilderData extends Partial<Omit<RESTPostAPIChannelMessageJSONBody, 'allowed_mentions' | 'attachments' | 'components' | 'embeds' | 'message_reference' | 'poll'>> {
|
|
9636
|
+
allowed_mentions?: AllowedMentionsBuilder;
|
|
9637
|
+
attachments: AttachmentBuilder[];
|
|
9638
|
+
components: ActionRowBuilder[];
|
|
9639
|
+
embeds: EmbedBuilder[];
|
|
9640
|
+
message_reference?: MessageReferenceBuilder;
|
|
9641
|
+
poll?: PollBuilder;
|
|
9642
|
+
}
|
|
9643
|
+
declare class MessageBuilder implements JSONEncodable<RESTPostAPIChannelMessageJSONBody> {
|
|
9644
|
+
/**
|
|
9645
|
+
* The API data associated with this message.
|
|
9646
|
+
*/
|
|
9647
|
+
private readonly data;
|
|
9648
|
+
/**
|
|
9649
|
+
* Gets the attachments of this message.
|
|
9650
|
+
*/
|
|
9651
|
+
get attachments(): readonly AttachmentBuilder[];
|
|
9652
|
+
/**
|
|
9653
|
+
* Gets the components of this message.
|
|
9654
|
+
*/
|
|
9655
|
+
get components(): readonly ActionRowBuilder[];
|
|
9656
|
+
/**
|
|
9657
|
+
* Gets the embeds of this message.
|
|
9658
|
+
*/
|
|
9659
|
+
get embeds(): readonly EmbedBuilder[];
|
|
9660
|
+
/**
|
|
9661
|
+
* Creates new attachment builder from API data.
|
|
9662
|
+
*
|
|
9663
|
+
* @param data - The API data to create this attachment with
|
|
9664
|
+
*/
|
|
9665
|
+
constructor(data?: Partial<RESTPostAPIChannelMessageJSONBody>);
|
|
9666
|
+
/**
|
|
9667
|
+
* Sets the content of the message.
|
|
9668
|
+
*
|
|
9669
|
+
* @param content - The content to set
|
|
9670
|
+
*/
|
|
9671
|
+
setContent(content: string): this;
|
|
9672
|
+
/**
|
|
9673
|
+
* Clears the content of the message.
|
|
9674
|
+
*/
|
|
9675
|
+
clearContent(): this;
|
|
9676
|
+
/**
|
|
9677
|
+
* Sets the nonce of the message.
|
|
9678
|
+
*
|
|
9679
|
+
* @param nonce - The nonce to set
|
|
9680
|
+
*/
|
|
9681
|
+
setNonce(nonce: number | string): this;
|
|
9682
|
+
/**
|
|
9683
|
+
* Clears the nonce of the message.
|
|
9684
|
+
*/
|
|
9685
|
+
clearNonce(): this;
|
|
9686
|
+
/**
|
|
9687
|
+
* Sets whether the message is TTS.
|
|
9688
|
+
*/
|
|
9689
|
+
setTTS(tts?: boolean): this;
|
|
9690
|
+
/**
|
|
9691
|
+
* Appends embeds to this message.
|
|
9692
|
+
*
|
|
9693
|
+
* @remarks
|
|
9694
|
+
* The maximum amount of embeds that can be added is 10.
|
|
9695
|
+
* @example
|
|
9696
|
+
* Using an array:
|
|
9697
|
+
* ```ts
|
|
9698
|
+
* const embeds: APIEmbed[] = ...;
|
|
9699
|
+
* const message = new MessageBuilder()
|
|
9700
|
+
* .addEmbeds(embeds);
|
|
9701
|
+
* ```
|
|
9702
|
+
* @example
|
|
9703
|
+
* Using rest parameters (variadic):
|
|
9704
|
+
* ```ts
|
|
9705
|
+
* const message = new MessageBuilder()
|
|
9706
|
+
* .addEmbeds(
|
|
9707
|
+
* { title: 'Embed 1' },
|
|
9708
|
+
* { title: 'Embed 2' },
|
|
9709
|
+
* );
|
|
9710
|
+
* ```
|
|
9711
|
+
* @param embeds - The embeds to add
|
|
9712
|
+
*/
|
|
9713
|
+
addEmbeds(...embeds: RestOrArray<APIEmbed | EmbedBuilder | ((builder: EmbedBuilder) => EmbedBuilder)>): this;
|
|
9714
|
+
/**
|
|
9715
|
+
* Removes, replaces, or inserts embeds for this message.
|
|
9716
|
+
*
|
|
9717
|
+
* @remarks
|
|
9718
|
+
* This method behaves similarly
|
|
9719
|
+
* to {@link https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array/splice | Array.prototype.splice()}.
|
|
9720
|
+
*
|
|
9721
|
+
* It's useful for modifying and adjusting order of the already-existing embeds of a message.
|
|
9722
|
+
* @example
|
|
9723
|
+
* Remove the first embed:
|
|
9724
|
+
* ```ts
|
|
9725
|
+
* message.spliceEmbeds(0, 1);
|
|
9726
|
+
* ```
|
|
9727
|
+
* @example
|
|
9728
|
+
* Remove the first n embeds:
|
|
9729
|
+
* ```ts
|
|
9730
|
+
* const n = 4;
|
|
9731
|
+
* message.spliceEmbeds(0, n);
|
|
9732
|
+
* ```
|
|
9733
|
+
* @example
|
|
9734
|
+
* Remove the last embed:
|
|
9735
|
+
* ```ts
|
|
9736
|
+
* message.spliceEmbeds(-1, 1);
|
|
9737
|
+
* ```
|
|
9738
|
+
* @param start - The index to start at
|
|
9739
|
+
* @param deleteCount - The amount of embeds to remove
|
|
9740
|
+
* @param embeds - The embeds to insert
|
|
9741
|
+
*/
|
|
9742
|
+
spliceEmbeds(start: number, deleteCount: number, ...embeds: RestOrArray<APIEmbed | EmbedBuilder | ((builder: EmbedBuilder) => EmbedBuilder)>): this;
|
|
9743
|
+
/**
|
|
9744
|
+
* Sets the allowed mentions for this message.
|
|
9745
|
+
*
|
|
9746
|
+
* @param allowedMentions - The allowed mentions to set
|
|
9747
|
+
*/
|
|
9748
|
+
setAllowedMentions(allowedMentions: AllowedMentionsBuilder | APIAllowedMentions | ((builder: AllowedMentionsBuilder) => AllowedMentionsBuilder)): this;
|
|
9749
|
+
/**
|
|
9750
|
+
* Updates the allowed mentions for this message (and creates it if it doesn't exist)
|
|
9751
|
+
*
|
|
9752
|
+
* @param updater - The function to update the allowed mentions with
|
|
9753
|
+
*/
|
|
9754
|
+
updateAllowedMentions(updater: (builder: AllowedMentionsBuilder) => AllowedMentionsBuilder): this;
|
|
9755
|
+
/**
|
|
9756
|
+
* Clears the allowed mentions for this message.
|
|
9757
|
+
*/
|
|
9758
|
+
clearAllowedMentions(): this;
|
|
9759
|
+
/**
|
|
9760
|
+
* Sets the message reference for this message.
|
|
9761
|
+
*
|
|
9762
|
+
* @param reference - The reference to set
|
|
9763
|
+
*/
|
|
9764
|
+
setMessageReference(reference: APIMessageReference | MessageReferenceBuilder | ((builder: MessageReferenceBuilder) => MessageReferenceBuilder)): this;
|
|
9765
|
+
/**
|
|
9766
|
+
* Updates the message reference for this message (and creates it if it doesn't exist)
|
|
9767
|
+
*
|
|
9768
|
+
* @param updater - The function to update the message reference with
|
|
9769
|
+
*/
|
|
9770
|
+
updateMessageReference(updater: (builder: MessageReferenceBuilder) => MessageReferenceBuilder): this;
|
|
9771
|
+
/**
|
|
9772
|
+
* Clears the message reference for this message.
|
|
9773
|
+
*/
|
|
9774
|
+
clearMessageReference(): this;
|
|
9775
|
+
/**
|
|
9776
|
+
* Adds components to this message.
|
|
9777
|
+
*
|
|
9778
|
+
* @param components - The components to add
|
|
9779
|
+
*/
|
|
9780
|
+
addComponents(...components: RestOrArray<ActionRowBuilder | APIActionRowComponent<APIMessageActionRowComponent> | ((builder: ActionRowBuilder) => ActionRowBuilder)>): this;
|
|
9781
|
+
/**
|
|
9782
|
+
* Removes, replaces, or inserts components for this message.
|
|
9783
|
+
*
|
|
9784
|
+
* @remarks
|
|
9785
|
+
* This method behaves similarly
|
|
9786
|
+
* to {@link https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array/splice | Array.prototype.splice()}.
|
|
9787
|
+
*
|
|
9788
|
+
* It's useful for modifying and adjusting order of the already-existing components of a message.
|
|
9789
|
+
* @example
|
|
9790
|
+
* Remove the first component:
|
|
9791
|
+
* ```ts
|
|
9792
|
+
* message.spliceComponents(0, 1);
|
|
9793
|
+
* ```
|
|
9794
|
+
* @example
|
|
9795
|
+
* Remove the first n components:
|
|
9796
|
+
* ```ts
|
|
9797
|
+
* const n = 4;
|
|
9798
|
+
* message.spliceComponents(0, n);
|
|
9799
|
+
* ```
|
|
9800
|
+
* @example
|
|
9801
|
+
* Remove the last component:
|
|
9802
|
+
* ```ts
|
|
9803
|
+
* message.spliceComponents(-1, 1);
|
|
9804
|
+
* ```
|
|
9805
|
+
* @param start - The index to start at
|
|
9806
|
+
* @param deleteCount - The amount of components to remove
|
|
9807
|
+
* @param components - The components to insert
|
|
9808
|
+
*/
|
|
9809
|
+
spliceComponents(start: number, deleteCount: number, ...components: RestOrArray<ActionRowBuilder | APIActionRowComponent<APIMessageActionRowComponent> | ((builder: ActionRowBuilder) => ActionRowBuilder)>): this;
|
|
9810
|
+
/**
|
|
9811
|
+
* Sets the components of this message.
|
|
9812
|
+
*
|
|
9813
|
+
* @param components - The components to set
|
|
9814
|
+
*/
|
|
9815
|
+
setComponents(...components: RestOrArray<ActionRowBuilder | APIActionRowComponent<APIMessageActionRowComponent> | ((builder: ActionRowBuilder) => ActionRowBuilder)>): this;
|
|
9816
|
+
/**
|
|
9817
|
+
* Sets the sticker ids of this message.
|
|
9818
|
+
*
|
|
9819
|
+
* @param stickerIds - The ids of the stickers to set
|
|
9820
|
+
*/
|
|
9821
|
+
setStickerIds(...stickerIds: RestOrArray<Snowflake>): this;
|
|
9822
|
+
/**
|
|
9823
|
+
* Adds sticker ids to this message.
|
|
9824
|
+
*
|
|
9825
|
+
* @param stickerIds - The ids of the stickers to add
|
|
9826
|
+
*/
|
|
9827
|
+
addStickerIds(...stickerIds: RestOrArray<Snowflake>): this;
|
|
9828
|
+
/**
|
|
9829
|
+
* Removes, replaces, or inserts sticker ids for this message.
|
|
9830
|
+
*
|
|
9831
|
+
* @remarks
|
|
9832
|
+
* This method behaves similarly
|
|
9833
|
+
* to {@link https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array/splice | Array.prototype.splice()}.
|
|
9834
|
+
*
|
|
9835
|
+
* It's useful for modifying and adjusting order of the already-existing sticker ids of a message.
|
|
9836
|
+
* @example
|
|
9837
|
+
* Remove the first sticker id:
|
|
9838
|
+
* ```ts
|
|
9839
|
+
* message.spliceStickerIds(0, 1);
|
|
9840
|
+
* ```
|
|
9841
|
+
* @example
|
|
9842
|
+
* Remove the first n sticker ids:
|
|
9843
|
+
* ```ts
|
|
9844
|
+
* const n = 4;
|
|
9845
|
+
* message.spliceStickerIds(0, n);
|
|
9846
|
+
* ```
|
|
9847
|
+
* @example
|
|
9848
|
+
* Remove the last sticker id:
|
|
9849
|
+
* ```ts
|
|
9850
|
+
* message.spliceStickerIds(-1, 1);
|
|
9851
|
+
* ```
|
|
9852
|
+
* @param index - The index to start at
|
|
9853
|
+
* @param deleteCount - The amount of sticker ids to remove
|
|
9854
|
+
* @param stickerIds - The sticker ids to insert
|
|
9855
|
+
*/
|
|
9856
|
+
spliceStickerIds(index: number, deleteCount: number, ...stickerIds: RestOrArray<Snowflake>): this;
|
|
9857
|
+
/**
|
|
9858
|
+
* Sets attachments for this message.
|
|
9859
|
+
*
|
|
9860
|
+
* @param attachments - The attachments to set
|
|
9861
|
+
*/
|
|
9862
|
+
setAttachments(...attachments: RestOrArray<APIAttachment | AttachmentBuilder | ((builder: AttachmentBuilder) => AttachmentBuilder)>): this;
|
|
9863
|
+
/**
|
|
9864
|
+
* Adds attachments to this message.
|
|
9865
|
+
*
|
|
9866
|
+
* @param attachments - The attachments to add
|
|
9867
|
+
*/
|
|
9868
|
+
addAttachments(...attachments: RestOrArray<APIAttachment | AttachmentBuilder | ((builder: AttachmentBuilder) => AttachmentBuilder)>): this;
|
|
9869
|
+
/**
|
|
9870
|
+
* Removes, replaces, or inserts attachments for this message.
|
|
9871
|
+
*
|
|
9872
|
+
* @remarks
|
|
9873
|
+
* This method behaves similarly
|
|
9874
|
+
* to {@link https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array/splice | Array.prototype.splice()}.
|
|
9875
|
+
*
|
|
9876
|
+
* It's useful for modifying and adjusting order of the already-existing attachments of a message.
|
|
9877
|
+
* @example
|
|
9878
|
+
* Remove the first attachment:
|
|
9879
|
+
* ```ts
|
|
9880
|
+
* message.spliceAttachments(0, 1);
|
|
9881
|
+
* ```
|
|
9882
|
+
* @example
|
|
9883
|
+
* Remove the first n attachments:
|
|
9884
|
+
* ```ts
|
|
9885
|
+
* const n = 4;
|
|
9886
|
+
* message.spliceAttachments(0, n);
|
|
9887
|
+
* ```
|
|
9888
|
+
* @example
|
|
9889
|
+
* Remove the last attachment:
|
|
9890
|
+
* ```ts
|
|
9891
|
+
* message.spliceAttachments(-1, 1);
|
|
9892
|
+
* ```
|
|
9893
|
+
* @param start - The index to start at
|
|
9894
|
+
* @param deleteCount - The amount of attachments to remove
|
|
9895
|
+
* @param attachments - The attachments to insert
|
|
9896
|
+
*/
|
|
9897
|
+
spliceAttachments(start: number, deleteCount: number, ...attachments: RestOrArray<APIAttachment | AttachmentBuilder | ((builder: AttachmentBuilder) => AttachmentBuilder)>): this;
|
|
9898
|
+
/**
|
|
9899
|
+
* Sets the flags for this message.
|
|
9900
|
+
*/
|
|
9901
|
+
setFlags(flags: MessageFlags): this;
|
|
9902
|
+
/**
|
|
9903
|
+
* Clears the flags for this message.
|
|
9904
|
+
*/
|
|
9905
|
+
clearFlags(): this;
|
|
9906
|
+
/**
|
|
9907
|
+
* Sets `enforce_nonce` for this message.
|
|
9908
|
+
*/
|
|
9909
|
+
setEnforceNonce(enforceNonce?: boolean): this;
|
|
9910
|
+
/**
|
|
9911
|
+
* Sets the poll for this message.
|
|
9912
|
+
*
|
|
9913
|
+
* @param poll - The poll to set
|
|
9914
|
+
*/
|
|
9915
|
+
setPoll(poll: APIPoll | PollBuilder | ((builder: PollBuilder) => PollBuilder)): this;
|
|
9916
|
+
/**
|
|
9917
|
+
* Updates the poll for this message (and creates it if it doesn't exist)
|
|
9918
|
+
*
|
|
9919
|
+
* @param updater - The function to update the poll with
|
|
9920
|
+
*/
|
|
9921
|
+
updatePoll(updater: (builder: PollBuilder) => PollBuilder): this;
|
|
9922
|
+
/**
|
|
9923
|
+
* Clears the poll for this message.
|
|
9924
|
+
*/
|
|
9925
|
+
clearPoll(): this;
|
|
9926
|
+
/**
|
|
9927
|
+
* Serializes this builder to API-compatible JSON data.
|
|
9928
|
+
*
|
|
9929
|
+
* Note that by disabling validation, there is no guarantee that the resulting object will be valid.
|
|
9930
|
+
*
|
|
9931
|
+
* @param validationOverride - Force validation to run/not run regardless of your global preference
|
|
9932
|
+
*/
|
|
9933
|
+
toJSON(validationOverride?: boolean): RESTPostAPIChannelMessageJSONBody;
|
|
9934
|
+
}
|
|
9935
|
+
|
|
8609
9936
|
/**
|
|
8610
9937
|
* Calculates the length of the embed.
|
|
8611
9938
|
*
|
|
@@ -8732,4 +10059,4 @@ declare const refineURLPredicate: (allowedProtocols: string[]) => (value: string
|
|
|
8732
10059
|
*/
|
|
8733
10060
|
declare const version: string;
|
|
8734
10061
|
|
|
8735
|
-
export { ActionRowBuilder, type ActionRowBuilderData, type AnyAPIActionRowComponent, type AnyActionRowComponentBuilder, type ApplicationCommandNumericOptionMinMaxValueData, ApplicationCommandNumericOptionMinMaxValueMixin, ApplicationCommandOptionAllowedChannelTypes, ApplicationCommandOptionBase, type ApplicationCommandOptionBaseData, type ApplicationCommandOptionChannelTypesData, ApplicationCommandOptionChannelTypesMixin, type ApplicationCommandOptionWithAutocompleteData, ApplicationCommandOptionWithAutocompleteMixin, type ApplicationCommandOptionWithChoicesData, ApplicationCommandOptionWithChoicesMixin, type AutocompletableOptions, BaseButtonBuilder, BaseSelectMenuBuilder, type ButtonBuilder, ChannelSelectMenuBuilder, ChatInputCommandAttachmentOption, ChatInputCommandBooleanOption, ChatInputCommandBuilder, ChatInputCommandChannelOption, ChatInputCommandIntegerOption, ChatInputCommandMentionableOption, ChatInputCommandNumberOption, ChatInputCommandRoleOption, ChatInputCommandStringOption, ChatInputCommandSubcommandBuilder, ChatInputCommandSubcommandGroupBuilder, type ChatInputCommandSubcommandGroupData, ChatInputCommandUserOption, CommandBuilder, type CommandData, ComponentBuilder, ContextMenuCommandBuilder, type ContextMenuCommandType, CustomIdButtonBuilder, type CustomIdButtonStyle, DangerButtonBuilder, EmbedAuthorBuilder, EmbedBuilder, type EmbedBuilderData, EmbedFieldBuilder, EmbedFooterBuilder, type EmojiOrLabelButtonData, EmojiOrLabelButtonMixin, LinkButtonBuilder, type MappedComponentTypes, MentionableSelectMenuBuilder, type MessageActionRowComponentBuilder, type MessageComponentBuilder, MessageContextCommandBuilder, type ModalActionRowComponentBuilder, ModalBuilder, type ModalBuilderData, type ModalComponentBuilder, PollAnswerBuilder, type PollAnswerData, PollAnswerMediaBuilder, PollBuilder, type PollData, PollMediaBuilder, PollQuestionBuilder, PremiumButtonBuilder, PrimaryButtonBuilder, type RestOrArray, RoleSelectMenuBuilder, SecondaryButtonBuilder, SharedChatInputCommandOptions, type SharedChatInputCommandOptionsData, SharedChatInputCommandSubcommands, type SharedChatInputCommandSubcommandsData, SharedName, SharedNameAndDescription, type SharedNameAndDescriptionData, type SharedNameData, StringSelectMenuBuilder, type StringSelectMenuData, StringSelectMenuOptionBuilder, SuccessButtonBuilder, TextInputBuilder, UserContextCommandBuilder, UserSelectMenuBuilder, actionRowPredicate, basicOptionPredicate, buttonPredicate, channelOptionPredicate, chatInputCommandPredicate, chatInputCommandSubcommandGroupPredicate, chatInputCommandSubcommandPredicate, createComponentBuilder, customIdPredicate, disableValidators, embedAuthorPredicate, embedFieldPredicate, embedFooterPredicate, embedLength, embedPredicate, emojiPredicate, enableValidators, integerOptionPredicate, isValidationEnabled, localeMapPredicate, memberPermissionsPredicate, messageCommandPredicate, modalPredicate, normalizeArray, numberOptionPredicate, pollAnswerMediaPredicate, pollAnswerPredicate, pollPredicate, pollQuestionPredicate, refineURLPredicate, resolveBuilder, selectMenuChannelPredicate, selectMenuMentionablePredicate, selectMenuRolePredicate, selectMenuStringOptionPredicate, selectMenuStringPredicate, selectMenuUserPredicate, stringOptionPredicate, textInputPredicate, userCommandPredicate, validate, version };
|
|
10062
|
+
export { ActionRowBuilder, type ActionRowBuilderData, AllowedMentionsBuilder, type AnyAPIActionRowComponent, type AnyActionRowComponentBuilder, type ApplicationCommandNumericOptionMinMaxValueData, ApplicationCommandNumericOptionMinMaxValueMixin, ApplicationCommandOptionAllowedChannelTypes, ApplicationCommandOptionBase, type ApplicationCommandOptionBaseData, type ApplicationCommandOptionChannelTypesData, ApplicationCommandOptionChannelTypesMixin, type ApplicationCommandOptionWithAutocompleteData, ApplicationCommandOptionWithAutocompleteMixin, type ApplicationCommandOptionWithChoicesData, ApplicationCommandOptionWithChoicesMixin, AttachmentBuilder, type AutocompletableOptions, BaseButtonBuilder, BaseSelectMenuBuilder, type ButtonBuilder, ChannelSelectMenuBuilder, ChatInputCommandAttachmentOption, ChatInputCommandBooleanOption, ChatInputCommandBuilder, ChatInputCommandChannelOption, ChatInputCommandIntegerOption, ChatInputCommandMentionableOption, ChatInputCommandNumberOption, ChatInputCommandRoleOption, ChatInputCommandStringOption, ChatInputCommandSubcommandBuilder, ChatInputCommandSubcommandGroupBuilder, type ChatInputCommandSubcommandGroupData, ChatInputCommandUserOption, CommandBuilder, type CommandData, ComponentBuilder, ContextMenuCommandBuilder, type ContextMenuCommandType, CustomIdButtonBuilder, type CustomIdButtonStyle, DangerButtonBuilder, EmbedAuthorBuilder, EmbedBuilder, type EmbedBuilderData, EmbedFieldBuilder, EmbedFooterBuilder, type EmojiOrLabelButtonData, EmojiOrLabelButtonMixin, LinkButtonBuilder, type MappedComponentTypes, MentionableSelectMenuBuilder, type MessageActionRowComponentBuilder, MessageBuilder, type MessageBuilderData, type MessageComponentBuilder, MessageContextCommandBuilder, MessageReferenceBuilder, type MessageReferenceBuilderData, type ModalActionRowComponentBuilder, ModalBuilder, type ModalBuilderData, type ModalComponentBuilder, PollAnswerBuilder, type PollAnswerData, PollAnswerMediaBuilder, PollBuilder, type PollData, PollMediaBuilder, PollQuestionBuilder, PremiumButtonBuilder, PrimaryButtonBuilder, type RestOrArray, RoleSelectMenuBuilder, SecondaryButtonBuilder, SharedChatInputCommandOptions, type SharedChatInputCommandOptionsData, SharedChatInputCommandSubcommands, type SharedChatInputCommandSubcommandsData, SharedName, SharedNameAndDescription, type SharedNameAndDescriptionData, type SharedNameData, StringSelectMenuBuilder, type StringSelectMenuData, StringSelectMenuOptionBuilder, SuccessButtonBuilder, TextInputBuilder, UserContextCommandBuilder, UserSelectMenuBuilder, actionRowPredicate, allowedMentionPredicate, attachmentPredicate, basicOptionPredicate, buttonPredicate, channelOptionPredicate, chatInputCommandPredicate, chatInputCommandSubcommandGroupPredicate, chatInputCommandSubcommandPredicate, createComponentBuilder, customIdPredicate, disableValidators, embedAuthorPredicate, embedFieldPredicate, embedFooterPredicate, embedLength, embedPredicate, emojiPredicate, enableValidators, integerOptionPredicate, isValidationEnabled, localeMapPredicate, memberPermissionsPredicate, messageCommandPredicate, messagePredicate, messageReferencePredicate, modalPredicate, normalizeArray, numberOptionPredicate, pollAnswerMediaPredicate, pollAnswerPredicate, pollPredicate, pollQuestionPredicate, refineURLPredicate, resolveBuilder, selectMenuChannelPredicate, selectMenuMentionablePredicate, selectMenuRolePredicate, selectMenuStringOptionPredicate, selectMenuStringPredicate, selectMenuUserPredicate, stringOptionPredicate, textInputPredicate, userCommandPredicate, validate, version };
|