* health check

* Update Dockerfile

* simplifying the deployment

* Update Bot.js

makes the find team command public

* test (#9)

* Dev (#7)

* health check

* Update Dockerfile

* simplifying the deployment

* Dev (#8)

* health check

* Update Dockerfile

* simplifying the deployment

* Update Bot.js

makes the find team command public

* Update PlayerService.js

* massive update????

could break stuff

* Update Bot.js

update
This commit is contained in:
VinceC
2025-07-07 21:38:19 -05:00
committed by GitHub
parent 0c86148835
commit 3453be6947
1742 changed files with 28844 additions and 67711 deletions

View File

@@ -1,5 +1,5 @@
import * as _sapphire_shapeshift from '@sapphire/shapeshift';
import { APIEmbedField, APIEmbedAuthor, APIEmbedFooter, APIEmbedImage, APIEmbed, APISelectMenuOption, APIMessageComponentEmoji, ButtonStyle, ChannelType, APIActionRowComponent, APIActionRowComponentTypes, APIBaseComponent, ComponentType, APIButtonComponent, Snowflake, APISelectMenuComponent, APIChannelSelectComponent, APIMentionableSelectComponent, APISelectMenuDefaultValue, SelectMenuDefaultValueType, APIRoleSelectComponent, APIStringSelectComponent, APIUserSelectComponent, APITextInputComponent, TextInputStyle, APIMessageActionRowComponent, APIModalActionRowComponent, APIModalComponent, APIMessageComponent, APIModalInteractionResponseCallbackData, LocalizationMap, LocaleString, InteractionContextType, Permissions, ApplicationIntegrationType, RESTPostAPIChatInputApplicationCommandsJSONBody, ApplicationCommandOptionType, APIApplicationCommandBasicOption, APIApplicationCommandAttachmentOption, APIApplicationCommandBooleanOption, APIApplicationCommandChannelOption, APIApplicationCommandOptionChoice, APIApplicationCommandIntegerOption, APIApplicationCommandMentionableOption, APIApplicationCommandNumberOption, APIApplicationCommandRoleOption, APIApplicationCommandStringOption, APIApplicationCommandUserOption, APIApplicationCommandSubcommandGroupOption, APIApplicationCommandSubcommandOption, APIApplicationCommandOption, Locale, ApplicationCommandType, RESTPostAPIContextMenuApplicationCommandsJSONBody } from 'discord-api-types/v10';
import { APIEmbedField, APIEmbedAuthor, APIEmbedFooter, APIEmbedImage, APIEmbed, APISelectMenuOption, APIMessageComponentEmoji, ButtonStyle, ChannelType, APIActionRowComponent, APIComponentInActionRow, APIMessageComponent, APIBaseComponent, ComponentType, APIButtonComponent, Snowflake, APISelectMenuComponent, APIChannelSelectComponent, APIMentionableSelectComponent, APISelectMenuDefaultValue, SelectMenuDefaultValueType, APIRoleSelectComponent, APIStringSelectComponent, APIUserSelectComponent, APITextInputComponent, TextInputStyle, APIComponentInMessageActionRow, APIComponentInModalActionRow, APIFileComponent, APISeparatorComponent, SeparatorSpacingSize, APITextDisplayComponent, APIContainerComponent, APIMediaGalleryComponent, APISectionComponent, APIComponentInContainer, APIMediaGalleryItem, APIThumbnailComponent, APIModalComponent, APIModalInteractionResponseCallbackData, LocalizationMap, LocaleString, InteractionContextType, Permissions, ApplicationIntegrationType, RESTPostAPIChatInputApplicationCommandsJSONBody, ApplicationCommandOptionType, APIApplicationCommandBasicOption, APIApplicationCommandAttachmentOption, APIApplicationCommandBooleanOption, APIApplicationCommandChannelOption, APIApplicationCommandOptionChoice, APIApplicationCommandIntegerOption, APIApplicationCommandMentionableOption, APIApplicationCommandNumberOption, APIApplicationCommandRoleOption, APIApplicationCommandStringOption, APIApplicationCommandUserOption, APIApplicationCommandSubcommandGroupOption, APIApplicationCommandSubcommandOption, APIApplicationCommandOption, Locale, ApplicationCommandType, RESTPostAPIContextMenuApplicationCommandsJSONBody } from 'discord-api-types/v10';
export * from '@discordjs/formatters';
import { JSONEncodable, Equatable } from '@discordjs/util';
@@ -40,7 +40,7 @@ declare const embedAuthorPredicate: _sapphire_shapeshift.ObjectValidator<{
}>>;
declare const RGBPredicate: _sapphire_shapeshift.NumberValidator<number>;
declare const colorPredicate: _sapphire_shapeshift.UnionValidator<number | [number, number, number] | null>;
declare const descriptionPredicate: _sapphire_shapeshift.UnionValidator<string | null>;
declare const descriptionPredicate$1: _sapphire_shapeshift.UnionValidator<string | null>;
declare const footerTextPredicate: _sapphire_shapeshift.UnionValidator<string | null>;
declare const embedFooterPredicate: _sapphire_shapeshift.ObjectValidator<{
text: string | null;
@@ -52,26 +52,25 @@ declare const embedFooterPredicate: _sapphire_shapeshift.ObjectValidator<{
declare const timestampPredicate: _sapphire_shapeshift.UnionValidator<number | Date | null>;
declare const titlePredicate: _sapphire_shapeshift.UnionValidator<string | null>;
declare const Assertions$5_RGBPredicate: typeof RGBPredicate;
declare const Assertions$5_authorNamePredicate: typeof authorNamePredicate;
declare const Assertions$5_colorPredicate: typeof colorPredicate;
declare const Assertions$5_descriptionPredicate: typeof descriptionPredicate;
declare const Assertions$5_embedAuthorPredicate: typeof embedAuthorPredicate;
declare const Assertions$5_embedFieldPredicate: typeof embedFieldPredicate;
declare const Assertions$5_embedFieldsArrayPredicate: typeof embedFieldsArrayPredicate;
declare const Assertions$5_embedFooterPredicate: typeof embedFooterPredicate;
declare const Assertions$5_fieldInlinePredicate: typeof fieldInlinePredicate;
declare const Assertions$5_fieldLengthPredicate: typeof fieldLengthPredicate;
declare const Assertions$5_fieldNamePredicate: typeof fieldNamePredicate;
declare const Assertions$5_fieldValuePredicate: typeof fieldValuePredicate;
declare const Assertions$5_footerTextPredicate: typeof footerTextPredicate;
declare const Assertions$5_imageURLPredicate: typeof imageURLPredicate;
declare const Assertions$5_timestampPredicate: typeof timestampPredicate;
declare const Assertions$5_titlePredicate: typeof titlePredicate;
declare const Assertions$5_urlPredicate: typeof urlPredicate;
declare const Assertions$5_validateFieldLength: typeof validateFieldLength;
declare namespace Assertions$5 {
export { Assertions$5_RGBPredicate as RGBPredicate, Assertions$5_authorNamePredicate as authorNamePredicate, Assertions$5_colorPredicate as colorPredicate, Assertions$5_descriptionPredicate as descriptionPredicate, Assertions$5_embedAuthorPredicate as embedAuthorPredicate, Assertions$5_embedFieldPredicate as embedFieldPredicate, Assertions$5_embedFieldsArrayPredicate as embedFieldsArrayPredicate, Assertions$5_embedFooterPredicate as embedFooterPredicate, Assertions$5_fieldInlinePredicate as fieldInlinePredicate, Assertions$5_fieldLengthPredicate as fieldLengthPredicate, Assertions$5_fieldNamePredicate as fieldNamePredicate, Assertions$5_fieldValuePredicate as fieldValuePredicate, Assertions$5_footerTextPredicate as footerTextPredicate, Assertions$5_imageURLPredicate as imageURLPredicate, Assertions$5_timestampPredicate as timestampPredicate, Assertions$5_titlePredicate as titlePredicate, Assertions$5_urlPredicate as urlPredicate, Assertions$5_validateFieldLength as validateFieldLength };
declare const Assertions$6_RGBPredicate: typeof RGBPredicate;
declare const Assertions$6_authorNamePredicate: typeof authorNamePredicate;
declare const Assertions$6_colorPredicate: typeof colorPredicate;
declare const Assertions$6_embedAuthorPredicate: typeof embedAuthorPredicate;
declare const Assertions$6_embedFieldPredicate: typeof embedFieldPredicate;
declare const Assertions$6_embedFieldsArrayPredicate: typeof embedFieldsArrayPredicate;
declare const Assertions$6_embedFooterPredicate: typeof embedFooterPredicate;
declare const Assertions$6_fieldInlinePredicate: typeof fieldInlinePredicate;
declare const Assertions$6_fieldLengthPredicate: typeof fieldLengthPredicate;
declare const Assertions$6_fieldNamePredicate: typeof fieldNamePredicate;
declare const Assertions$6_fieldValuePredicate: typeof fieldValuePredicate;
declare const Assertions$6_footerTextPredicate: typeof footerTextPredicate;
declare const Assertions$6_imageURLPredicate: typeof imageURLPredicate;
declare const Assertions$6_timestampPredicate: typeof timestampPredicate;
declare const Assertions$6_titlePredicate: typeof titlePredicate;
declare const Assertions$6_urlPredicate: typeof urlPredicate;
declare const Assertions$6_validateFieldLength: typeof validateFieldLength;
declare namespace Assertions$6 {
export { Assertions$6_RGBPredicate as RGBPredicate, Assertions$6_authorNamePredicate as authorNamePredicate, Assertions$6_colorPredicate as colorPredicate, descriptionPredicate$1 as descriptionPredicate, Assertions$6_embedAuthorPredicate as embedAuthorPredicate, Assertions$6_embedFieldPredicate as embedFieldPredicate, Assertions$6_embedFieldsArrayPredicate as embedFieldsArrayPredicate, Assertions$6_embedFooterPredicate as embedFooterPredicate, Assertions$6_fieldInlinePredicate as fieldInlinePredicate, Assertions$6_fieldLengthPredicate as fieldLengthPredicate, Assertions$6_fieldNamePredicate as fieldNamePredicate, Assertions$6_fieldValuePredicate as fieldValuePredicate, Assertions$6_footerTextPredicate as footerTextPredicate, Assertions$6_imageURLPredicate as imageURLPredicate, Assertions$6_timestampPredicate as timestampPredicate, Assertions$6_titlePredicate as titlePredicate, Assertions$6_urlPredicate as urlPredicate, Assertions$6_validateFieldLength as validateFieldLength };
}
/**
@@ -346,6 +345,7 @@ declare class StringSelectMenuOptionBuilder implements JSONEncodable<APISelectMe
toJSON(): APISelectMenuOption;
}
declare const idValidator: _sapphire_shapeshift.NumberValidator<number>;
declare const customIdValidator: _sapphire_shapeshift.StringValidator<string>;
declare const emojiValidator: _sapphire_shapeshift.ObjectValidator<{
name?: string | undefined;
@@ -393,31 +393,32 @@ declare const channelTypesValidator: _sapphire_shapeshift.ArrayValidator<Channel
declare const urlValidator: _sapphire_shapeshift.StringValidator<string>;
declare function validateRequiredButtonParameters(style?: ButtonStyle, label?: string, emoji?: APIMessageComponentEmoji, customId?: string, skuId?: string, url?: string): void;
declare const Assertions$4_buttonLabelValidator: typeof buttonLabelValidator;
declare const Assertions$4_buttonStyleValidator: typeof buttonStyleValidator;
declare const Assertions$4_channelTypesValidator: typeof channelTypesValidator;
declare const Assertions$4_customIdValidator: typeof customIdValidator;
declare const Assertions$4_defaultValidator: typeof defaultValidator;
declare const Assertions$4_disabledValidator: typeof disabledValidator;
declare const Assertions$4_emojiValidator: typeof emojiValidator;
declare const Assertions$4_jsonOptionValidator: typeof jsonOptionValidator;
declare const Assertions$4_labelValueDescriptionValidator: typeof labelValueDescriptionValidator;
declare const Assertions$4_minMaxValidator: typeof minMaxValidator;
declare const Assertions$4_optionValidator: typeof optionValidator;
declare const Assertions$4_optionsLengthValidator: typeof optionsLengthValidator;
declare const Assertions$4_optionsValidator: typeof optionsValidator;
declare const Assertions$4_urlValidator: typeof urlValidator;
declare const Assertions$4_validateRequiredButtonParameters: typeof validateRequiredButtonParameters;
declare const Assertions$4_validateRequiredSelectMenuOptionParameters: typeof validateRequiredSelectMenuOptionParameters;
declare const Assertions$4_validateRequiredSelectMenuParameters: typeof validateRequiredSelectMenuParameters;
declare namespace Assertions$4 {
export { Assertions$4_buttonLabelValidator as buttonLabelValidator, Assertions$4_buttonStyleValidator as buttonStyleValidator, Assertions$4_channelTypesValidator as channelTypesValidator, Assertions$4_customIdValidator as customIdValidator, Assertions$4_defaultValidator as defaultValidator, Assertions$4_disabledValidator as disabledValidator, Assertions$4_emojiValidator as emojiValidator, Assertions$4_jsonOptionValidator as jsonOptionValidator, Assertions$4_labelValueDescriptionValidator as labelValueDescriptionValidator, Assertions$4_minMaxValidator as minMaxValidator, Assertions$4_optionValidator as optionValidator, Assertions$4_optionsLengthValidator as optionsLengthValidator, Assertions$4_optionsValidator as optionsValidator, placeholderValidator$1 as placeholderValidator, Assertions$4_urlValidator as urlValidator, Assertions$4_validateRequiredButtonParameters as validateRequiredButtonParameters, Assertions$4_validateRequiredSelectMenuOptionParameters as validateRequiredSelectMenuOptionParameters, Assertions$4_validateRequiredSelectMenuParameters as validateRequiredSelectMenuParameters };
declare const Assertions$5_buttonLabelValidator: typeof buttonLabelValidator;
declare const Assertions$5_buttonStyleValidator: typeof buttonStyleValidator;
declare const Assertions$5_channelTypesValidator: typeof channelTypesValidator;
declare const Assertions$5_customIdValidator: typeof customIdValidator;
declare const Assertions$5_defaultValidator: typeof defaultValidator;
declare const Assertions$5_disabledValidator: typeof disabledValidator;
declare const Assertions$5_emojiValidator: typeof emojiValidator;
declare const Assertions$5_idValidator: typeof idValidator;
declare const Assertions$5_jsonOptionValidator: typeof jsonOptionValidator;
declare const Assertions$5_labelValueDescriptionValidator: typeof labelValueDescriptionValidator;
declare const Assertions$5_minMaxValidator: typeof minMaxValidator;
declare const Assertions$5_optionValidator: typeof optionValidator;
declare const Assertions$5_optionsLengthValidator: typeof optionsLengthValidator;
declare const Assertions$5_optionsValidator: typeof optionsValidator;
declare const Assertions$5_urlValidator: typeof urlValidator;
declare const Assertions$5_validateRequiredButtonParameters: typeof validateRequiredButtonParameters;
declare const Assertions$5_validateRequiredSelectMenuOptionParameters: typeof validateRequiredSelectMenuOptionParameters;
declare const Assertions$5_validateRequiredSelectMenuParameters: typeof validateRequiredSelectMenuParameters;
declare namespace Assertions$5 {
export { Assertions$5_buttonLabelValidator as buttonLabelValidator, Assertions$5_buttonStyleValidator as buttonStyleValidator, Assertions$5_channelTypesValidator as channelTypesValidator, Assertions$5_customIdValidator as customIdValidator, Assertions$5_defaultValidator as defaultValidator, Assertions$5_disabledValidator as disabledValidator, Assertions$5_emojiValidator as emojiValidator, Assertions$5_idValidator as idValidator, Assertions$5_jsonOptionValidator as jsonOptionValidator, Assertions$5_labelValueDescriptionValidator as labelValueDescriptionValidator, Assertions$5_minMaxValidator as minMaxValidator, Assertions$5_optionValidator as optionValidator, Assertions$5_optionsLengthValidator as optionsLengthValidator, Assertions$5_optionsValidator as optionsValidator, placeholderValidator$1 as placeholderValidator, Assertions$5_urlValidator as urlValidator, Assertions$5_validateRequiredButtonParameters as validateRequiredButtonParameters, Assertions$5_validateRequiredSelectMenuOptionParameters as validateRequiredSelectMenuOptionParameters, Assertions$5_validateRequiredSelectMenuParameters as validateRequiredSelectMenuParameters };
}
/**
* Any action row component data represented as an object.
*/
type AnyAPIActionRowComponent = APIActionRowComponent<APIActionRowComponentTypes> | APIActionRowComponentTypes;
type AnyAPIActionRowComponent = APIActionRowComponent<APIComponentInActionRow> | APIComponentInActionRow | APIMessageComponent;
/**
* The base component builder that contains common symbols for all sorts of components.
*
@@ -442,6 +443,16 @@ declare abstract class ComponentBuilder<DataType extends Partial<APIBaseComponen
* @param data - The data to construct a component out of
*/
constructor(data: Partial<DataType>);
/**
* Sets the id (not the custom id) for this component.
*
* @param id - The id for this component
*/
setId(id: number): this;
/**
* Clears the id of this component, defaulting to a default incremented id.
*/
clearId(): this;
}
/**
@@ -940,10 +951,6 @@ declare class TextInputBuilder extends ComponentBuilder<APITextInputComponent> i
equals(other: APITextInputComponent | JSONEncodable<APITextInputComponent>): boolean;
}
/**
* The builders that may be used for messages.
*/
type MessageComponentBuilder = ActionRowBuilder<MessageActionRowComponentBuilder> | MessageActionRowComponentBuilder;
/**
* The builders that may be used for modals.
*/
@@ -965,7 +972,7 @@ type AnyComponentBuilder = MessageActionRowComponentBuilder | ModalActionRowComp
*
* @typeParam ComponentType - The types of components this action row holds
*/
declare class ActionRowBuilder<ComponentType extends AnyComponentBuilder> extends ComponentBuilder<APIActionRowComponent<APIMessageActionRowComponent | APIModalActionRowComponent>> {
declare class ActionRowBuilder<ComponentType extends AnyComponentBuilder> extends ComponentBuilder<APIActionRowComponent<APIComponentInMessageActionRow | APIComponentInModalActionRow>> {
/**
* The components within this action row.
*/
@@ -1004,7 +1011,7 @@ declare class ActionRowBuilder<ComponentType extends AnyComponentBuilder> extend
* .addComponents(button2, button3);
* ```
*/
constructor({ components, ...data }?: Partial<APIActionRowComponent<APIActionRowComponentTypes>>);
constructor({ components, ...data }?: Partial<APIActionRowComponent<APIComponentInActionRow>>);
/**
* Adds components to this action row.
*
@@ -1023,6 +1030,504 @@ declare class ActionRowBuilder<ComponentType extends AnyComponentBuilder> extend
toJSON(): APIActionRowComponent<ReturnType<ComponentType['toJSON']>>;
}
declare class FileBuilder extends ComponentBuilder<APIFileComponent> {
/**
* Creates a new file from API data.
*
* @param data - The API data to create this file with
* @example
* Creating a file from an API data object:
* ```ts
* const file = new FileBuilder({
* spoiler: true,
* file: {
* url: 'attachment://file.png',
* },
* });
* ```
* @example
* Creating a file using setters and API data:
* ```ts
* const file = new FileBuilder({
* file: {
* url: 'attachment://image.jpg',
* },
* })
* .setSpoiler(false);
* ```
*/
constructor(data?: Partial<APIFileComponent>);
/**
* Sets the spoiler status of this file.
*
* @param spoiler - The spoiler status to use
*/
setSpoiler(spoiler?: boolean): this;
/**
* Sets the media URL of this file.
*
* @param url - The URL to use
*/
setURL(url: string): this;
/**
* {@inheritDoc ComponentBuilder.toJSON}
*/
toJSON(): APIFileComponent;
}
declare class SeparatorBuilder extends ComponentBuilder<APISeparatorComponent> {
/**
* Creates a new separator from API data.
*
* @param data - The API data to create this separator with
* @example
* Creating a separator from an API data object:
* ```ts
* const separator = new SeparatorBuilder({
* spacing: SeparatorSpacingSize.Small,
* divider: true,
* });
* ```
* @example
* Creating a separator using setters and API data:
* ```ts
* const separator = new SeparatorBuilder({
* spacing: SeparatorSpacingSize.Large,
* })
* .setDivider(false);
* ```
*/
constructor(data?: Partial<APISeparatorComponent>);
/**
* Sets whether this separator should show a divider line.
*
* @param divider - Whether to show a divider line
*/
setDivider(divider?: boolean): this;
/**
* Sets the spacing of this separator.
*
* @param spacing - The spacing to use
*/
setSpacing(spacing: SeparatorSpacingSize): this;
/**
* Clears the spacing of this separator.
*/
clearSpacing(): this;
/**
* {@inheritDoc ComponentBuilder.toJSON}
*/
toJSON(): APISeparatorComponent;
}
declare class TextDisplayBuilder extends ComponentBuilder<APITextDisplayComponent> {
/**
* Creates a new text display from API data.
*
* @param data - The API data to create this text display with
* @example
* Creating a text display from an API data object:
* ```ts
* const textDisplay = new TextDisplayBuilder({
* content: 'some text',
* });
* ```
* @example
* Creating a text display using setters and API data:
* ```ts
* const textDisplay = new TextDisplayBuilder({
* content: 'old text',
* })
* .setContent('new text');
* ```
*/
constructor(data?: Partial<APITextDisplayComponent>);
/**
* Sets the text of this text display.
*
* @param content - The text to use
*/
setContent(content: string): this;
/**
* {@inheritDoc ComponentBuilder.toJSON}
*/
toJSON(): APITextDisplayComponent;
}
/**
* The builders that may be used within a container.
*/
type ContainerComponentBuilder = ActionRowBuilder<AnyComponentBuilder> | FileBuilder | MediaGalleryBuilder | SectionBuilder | SeparatorBuilder | TextDisplayBuilder;
/**
* A builder that creates API-compatible JSON data for a container.
*/
declare class ContainerBuilder extends ComponentBuilder<APIContainerComponent> {
/**
* The components within this container.
*/
readonly components: ContainerComponentBuilder[];
/**
* Creates a new container from API data.
*
* @param data - The API data to create this container with
* @example
* Creating a container from an API data object:
* ```ts
* const container = new ContainerBuilder({
* components: [
* {
* content: "Some text here",
* type: ComponentType.TextDisplay,
* },
* ],
* });
* ```
* @example
* Creating a container using setters and API data:
* ```ts
* const container = new ContainerBuilder({
* components: [
* {
* content: "# Heading",
* type: ComponentType.TextDisplay,
* },
* ],
* })
* .addComponents(separator, section);
* ```
*/
constructor({ components, ...data }?: Partial<APIContainerComponent>);
/**
* Sets the accent color of this container.
*
* @param color - The color to use
*/
setAccentColor(color?: RGBTuple | number): this;
/**
* Clears the accent color of this container.
*/
clearAccentColor(): this;
/**
* Adds action row components to this container.
*
* @param components - The action row components to add
*/
addActionRowComponents<ComponentType extends MessageActionRowComponentBuilder>(...components: RestOrArray<ActionRowBuilder<ComponentType> | APIActionRowComponent<APIComponentInMessageActionRow> | ((builder: ActionRowBuilder<ComponentType>) => ActionRowBuilder<ComponentType>)>): this;
/**
* Adds file components to this container.
*
* @param components - The file components to add
*/
addFileComponents(...components: RestOrArray<APIFileComponent | FileBuilder | ((builder: FileBuilder) => FileBuilder)>): this;
/**
* Adds media gallery components to this container.
*
* @param components - The media gallery components to add
*/
addMediaGalleryComponents(...components: RestOrArray<APIMediaGalleryComponent | MediaGalleryBuilder | ((builder: MediaGalleryBuilder) => MediaGalleryBuilder)>): this;
/**
* Adds section components to this container.
*
* @param components - The section components to add
*/
addSectionComponents(...components: RestOrArray<APISectionComponent | SectionBuilder | ((builder: SectionBuilder) => SectionBuilder)>): this;
/**
* Adds separator components to this container.
*
* @param components - The separator components to add
*/
addSeparatorComponents(...components: RestOrArray<APISeparatorComponent | SeparatorBuilder | ((builder: SeparatorBuilder) => SeparatorBuilder)>): this;
/**
* Adds text display components to this container.
*
* @param components - The text display components to add
*/
addTextDisplayComponents(...components: RestOrArray<APITextDisplayComponent | TextDisplayBuilder | ((builder: TextDisplayBuilder) => TextDisplayBuilder)>): this;
/**
* Removes, replaces, or inserts components for this container.
*
* @param index - The index to start removing, replacing or inserting components
* @param deleteCount - The amount of components to remove
* @param components - The components to set
*/
spliceComponents(index: number, deleteCount: number, ...components: RestOrArray<APIComponentInContainer | ContainerComponentBuilder>): this;
/**
* Sets the spoiler status of this container.
*
* @param spoiler - The spoiler status to use
*/
setSpoiler(spoiler?: boolean): this;
/**
* {@inheritDoc ComponentBuilder.toJSON}
*/
toJSON(): APIContainerComponent;
}
declare class MediaGalleryItemBuilder implements JSONEncodable<APIMediaGalleryItem> {
/**
* The API data associated with this media gallery item.
*/
readonly data: Partial<APIMediaGalleryItem>;
/**
* Creates a new media gallery item from API data.
*
* @param data - The API data to create this media gallery item with
* @example
* Creating a media gallery item from an API data object:
* ```ts
* const item = new MediaGalleryItemBuilder({
* description: "Some text here",
* media: {
* url: 'https://cdn.discordapp.com/embed/avatars/2.png',
* },
* });
* ```
* @example
* Creating a media gallery item using setters and API data:
* ```ts
* const item = new MediaGalleryItemBuilder({
* media: {
* url: 'https://cdn.discordapp.com/embed/avatars/5.png',
* },
* })
* .setDescription("alt text");
* ```
*/
constructor(data?: Partial<APIMediaGalleryItem>);
/**
* Sets the description of this media gallery item.
*
* @param description - The description to use
*/
setDescription(description: string): this;
/**
* Clears the description of this media gallery item.
*/
clearDescription(): this;
/**
* Sets the spoiler status of this media gallery item.
*
* @param spoiler - The spoiler status to use
*/
setSpoiler(spoiler?: boolean): this;
/**
* Sets the media URL of this media gallery item.
*
* @param url - The URL to use
*/
setURL(url: string): this;
/**
* Serializes this builder to API-compatible JSON data.
*
* @remarks
* This method runs validations on the data before serializing it.
* As such, it may throw an error if the data is invalid.
*/
toJSON(): APIMediaGalleryItem;
}
/**
* A builder that creates API-compatible JSON data for a container.
*/
declare class MediaGalleryBuilder extends ComponentBuilder<APIMediaGalleryComponent> {
/**
* The components within this container.
*/
readonly items: MediaGalleryItemBuilder[];
/**
* Creates a new media gallery from API data.
*
* @param data - The API data to create this media gallery with
* @example
* Creating a media gallery from an API data object:
* ```ts
* const mediaGallery = new MediaGalleryBuilder({
* items: [
* {
* description: "Some text here",
* media: {
* url: 'https://cdn.discordapp.com/embed/avatars/2.png',
* },
* },
* ],
* });
* ```
* @example
* Creating a media gallery using setters and API data:
* ```ts
* const mediaGallery = new MediaGalleryBuilder({
* items: [
* {
* description: "alt text",
* media: {
* url: 'https://cdn.discordapp.com/embed/avatars/5.png',
* },
* },
* ],
* })
* .addItems(item2, item3);
* ```
*/
constructor({ items, ...data }?: Partial<APIMediaGalleryComponent>);
/**
* Adds items to this media gallery.
*
* @param items - The items to add
*/
addItems(...items: RestOrArray<APIMediaGalleryItem | MediaGalleryItemBuilder | ((builder: MediaGalleryItemBuilder) => MediaGalleryItemBuilder)>): this;
/**
* Removes, replaces, or inserts media gallery items for this media gallery.
*
* @param index - The index to start removing, replacing or inserting items
* @param deleteCount - The amount of items to remove
* @param items - The items to insert
*/
spliceItems(index: number, deleteCount: number, ...items: RestOrArray<APIMediaGalleryItem | MediaGalleryItemBuilder | ((builder: MediaGalleryItemBuilder) => MediaGalleryItemBuilder)>): this;
/**
* {@inheritDoc ComponentBuilder.toJSON}
*/
toJSON(): APIMediaGalleryComponent;
}
/**
* A builder that creates API-compatible JSON data for a section.
*/
declare class SectionBuilder extends ComponentBuilder<APISectionComponent> {
/**
* The components within this section.
*/
readonly components: ComponentBuilder[];
/**
* The accessory of this section.
*/
readonly accessory?: ButtonBuilder | ThumbnailBuilder;
/**
* Creates a new section from API data.
*
* @param data - The API data to create this section with
* @example
* Creating a section from an API data object:
* ```ts
* const section = new SectionBuilder({
* components: [
* {
* content: "Some text here",
* type: ComponentType.TextDisplay,
* },
* ],
* accessory: {
* media: {
* url: 'https://cdn.discordapp.com/embed/avatars/3.png',
* },
* }
* });
* ```
* @example
* Creating a section using setters and API data:
* ```ts
* const section = new SectionBuilder({
* components: [
* {
* content: "# Heading",
* type: ComponentType.TextDisplay,
* },
* ],
* })
* .setPrimaryButtonAccessory(button);
* ```
*/
constructor({ components, accessory, ...data }?: Partial<APISectionComponent>);
/**
* Sets the accessory of this section to a button.
*
* @param accessory - The accessory to use
*/
setButtonAccessory(accessory: APIButtonComponent | ButtonBuilder | ((builder: ButtonBuilder) => ButtonBuilder)): this;
/**
* Sets the accessory of this section to a thumbnail.
*
* @param accessory - The accessory to use
*/
setThumbnailAccessory(accessory: APIThumbnailComponent | ThumbnailBuilder | ((builder: ThumbnailBuilder) => ThumbnailBuilder)): this;
/**
* Adds text display components to this section.
*
* @param components - The text display components to add
*/
addTextDisplayComponents(...components: RestOrArray<TextDisplayBuilder | ((builder: TextDisplayBuilder) => TextDisplayBuilder)>): this;
/**
* Removes, replaces, or inserts text display components for this section.
*
* @param index - The index to start removing, replacing or inserting text display components
* @param deleteCount - The amount of text display components to remove
* @param components - The text display components to insert
*/
spliceTextDisplayComponents(index: number, deleteCount: number, ...components: RestOrArray<APITextDisplayComponent | TextDisplayBuilder | ((builder: TextDisplayBuilder) => TextDisplayBuilder)>): this;
/**
* {@inheritDoc ComponentBuilder.toJSON}
*/
toJSON(): APISectionComponent;
}
declare class ThumbnailBuilder extends ComponentBuilder<APIThumbnailComponent> {
/**
* Creates a new thumbnail from API data.
*
* @param data - The API data to create this thumbnail with
* @example
* Creating a thumbnail from an API data object:
* ```ts
* const thumbnail = new ThumbnailBuilder({
* description: 'some text',
* media: {
* url: 'https://cdn.discordapp.com/embed/avatars/4.png',
* },
* });
* ```
* @example
* Creating a thumbnail using setters and API data:
* ```ts
* const thumbnail = new ThumbnailBuilder({
* media: {
* url: 'attachment://image.png',
* },
* })
* .setDescription('alt text');
* ```
*/
constructor(data?: Partial<APIThumbnailComponent>);
/**
* Sets the description of this thumbnail.
*
* @param description - The description to use
*/
setDescription(description: string): this;
/**
* Clears the description of this thumbnail.
*/
clearDescription(): this;
/**
* Sets the spoiler status of this thumbnail.
*
* @param spoiler - The spoiler status to use
*/
setSpoiler(spoiler?: boolean): this;
/**
* Sets the media URL of this thumbnail.
*
* @param url - The URL to use
*/
setURL(url: string): this;
/**
* {@inheritdoc ComponentBuilder.toJSON}
*/
toJSON(): APIThumbnailComponent;
}
/**
* The builders that may be used for messages.
*/
type MessageComponentBuilder = ActionRowBuilder<MessageActionRowComponentBuilder> | ContainerBuilder | FileBuilder | MediaGalleryBuilder | MessageActionRowComponentBuilder | SectionBuilder | SeparatorBuilder | TextDisplayBuilder | ThumbnailBuilder;
/**
* Components here are mapped to their respective builder.
*/
@@ -1059,6 +1564,34 @@ interface MappedComponentTypes {
* The channel select component type is associated with a {@link ChannelSelectMenuBuilder}.
*/
[ComponentType.ChannelSelect]: ChannelSelectMenuBuilder;
/**
* The file component type is associated with a {@link FileBuilder}.
*/
[ComponentType.File]: FileBuilder;
/**
* The separator component type is associated with a {@link SeparatorBuilder}.
*/
[ComponentType.Separator]: SeparatorBuilder;
/**
* The container component type is associated with a {@link ContainerBuilder}.
*/
[ComponentType.Container]: ContainerBuilder;
/**
* The text display component type is associated with a {@link TextDisplayBuilder}.
*/
[ComponentType.TextDisplay]: TextDisplayBuilder;
/**
* The thumbnail component type is associated with a {@link ThumbnailBuilder}.
*/
[ComponentType.Thumbnail]: ThumbnailBuilder;
/**
* The section component type is associated with a {@link SectionBuilder}.
*/
[ComponentType.Section]: SectionBuilder;
/**
* The media gallery component type is associated with a {@link MediaGalleryBuilder}.
*/
[ComponentType.MediaGallery]: MediaGalleryBuilder;
}
/**
* Factory for creating components from API data.
@@ -1076,6 +1609,7 @@ declare function createComponentBuilder<ComponentType extends keyof MappedCompon
* @param data - The API data to transform to a component class
*/
declare function createComponentBuilder<ComponentBuilder extends MessageComponentBuilder | ModalComponentBuilder>(data: ComponentBuilder): ComponentBuilder;
declare function resolveBuilder<ComponentType extends Record<PropertyKey, any>, Builder extends JSONEncodable<any>>(builder: Builder | ComponentType | ((builder: Builder) => Builder), Constructor: new (data?: ComponentType) => Builder): Builder;
declare const textInputStyleValidator: _sapphire_shapeshift.NativeEnumValidator<typeof TextInputStyle>;
declare const minLengthValidator: _sapphire_shapeshift.NumberValidator<number>;
@@ -1086,15 +1620,15 @@ declare const placeholderValidator: _sapphire_shapeshift.StringValidator<string>
declare const labelValidator: _sapphire_shapeshift.StringValidator<string>;
declare function validateRequiredParameters$3(customId?: string, style?: TextInputStyle, label?: string): void;
declare const Assertions$3_labelValidator: typeof labelValidator;
declare const Assertions$3_maxLengthValidator: typeof maxLengthValidator;
declare const Assertions$3_minLengthValidator: typeof minLengthValidator;
declare const Assertions$3_placeholderValidator: typeof placeholderValidator;
declare const Assertions$3_requiredValidator: typeof requiredValidator;
declare const Assertions$3_textInputStyleValidator: typeof textInputStyleValidator;
declare const Assertions$3_valueValidator: typeof valueValidator;
declare namespace Assertions$3 {
export { Assertions$3_labelValidator as labelValidator, Assertions$3_maxLengthValidator as maxLengthValidator, Assertions$3_minLengthValidator as minLengthValidator, Assertions$3_placeholderValidator as placeholderValidator, Assertions$3_requiredValidator as requiredValidator, Assertions$3_textInputStyleValidator as textInputStyleValidator, validateRequiredParameters$3 as validateRequiredParameters, Assertions$3_valueValidator as valueValidator };
declare const Assertions$4_labelValidator: typeof labelValidator;
declare const Assertions$4_maxLengthValidator: typeof maxLengthValidator;
declare const Assertions$4_minLengthValidator: typeof minLengthValidator;
declare const Assertions$4_placeholderValidator: typeof placeholderValidator;
declare const Assertions$4_requiredValidator: typeof requiredValidator;
declare const Assertions$4_textInputStyleValidator: typeof textInputStyleValidator;
declare const Assertions$4_valueValidator: typeof valueValidator;
declare namespace Assertions$4 {
export { Assertions$4_labelValidator as labelValidator, Assertions$4_maxLengthValidator as maxLengthValidator, Assertions$4_minLengthValidator as minLengthValidator, Assertions$4_placeholderValidator as placeholderValidator, Assertions$4_requiredValidator as requiredValidator, Assertions$4_textInputStyleValidator as textInputStyleValidator, validateRequiredParameters$3 as validateRequiredParameters, Assertions$4_valueValidator as valueValidator };
}
/**
@@ -1132,7 +1666,7 @@ declare class ModalBuilder implements JSONEncodable<APIModalInteractionResponseC
*
* @param components - The components to add
*/
addComponents(...components: RestOrArray<ActionRowBuilder<ModalActionRowComponentBuilder> | APIActionRowComponent<APIModalActionRowComponent>>): this;
addComponents(...components: RestOrArray<ActionRowBuilder<ModalActionRowComponentBuilder> | APIActionRowComponent<APIComponentInModalActionRow>>): this;
/**
* Sets components for this modal.
*
@@ -1149,10 +1683,44 @@ declare const titleValidator: _sapphire_shapeshift.StringValidator<string>;
declare const componentsValidator: _sapphire_shapeshift.ArrayValidator<[ActionRowBuilder<AnyComponentBuilder>, ...ActionRowBuilder<AnyComponentBuilder>[]], ActionRowBuilder<AnyComponentBuilder>>;
declare function validateRequiredParameters$2(customId?: string, title?: string, components?: ActionRowBuilder<ModalActionRowComponentBuilder>[]): void;
declare const Assertions$2_componentsValidator: typeof componentsValidator;
declare const Assertions$2_titleValidator: typeof titleValidator;
declare const Assertions$3_componentsValidator: typeof componentsValidator;
declare const Assertions$3_titleValidator: typeof titleValidator;
declare namespace Assertions$3 {
export { Assertions$3_componentsValidator as componentsValidator, Assertions$3_titleValidator as titleValidator, validateRequiredParameters$2 as validateRequiredParameters };
}
declare const unfurledMediaItemPredicate: _sapphire_shapeshift.ObjectValidator<{
url: string;
}, _sapphire_shapeshift.UndefinedToOptional<{
url: string;
}>>;
declare const descriptionPredicate: _sapphire_shapeshift.StringValidator<string>;
declare const filePredicate: _sapphire_shapeshift.ObjectValidator<{
url: string;
}, _sapphire_shapeshift.UndefinedToOptional<{
url: string;
}>>;
declare const spoilerPredicate: _sapphire_shapeshift.BooleanValidator<boolean>;
declare const dividerPredicate: _sapphire_shapeshift.BooleanValidator<boolean>;
declare const spacingPredicate: _sapphire_shapeshift.NativeEnumValidator<typeof SeparatorSpacingSize>;
declare const textDisplayContentPredicate: _sapphire_shapeshift.StringValidator<string>;
declare const accessoryPredicate: _sapphire_shapeshift.UnionValidator<ButtonBuilder | ThumbnailBuilder>;
declare const containerColorPredicate: _sapphire_shapeshift.UnionValidator<number | [number, number, number] | null | undefined>;
declare function assertReturnOfBuilder$1<ReturnType extends MediaGalleryItemBuilder | TextDisplayBuilder>(input: unknown, ExpectedInstanceOf: new () => ReturnType): asserts input is ReturnType;
declare function validateComponentArray<ReturnType extends ContainerComponentBuilder | MediaGalleryItemBuilder = ContainerComponentBuilder>(input: unknown, min: number, max: number, ExpectedInstanceOf?: new () => ReturnType): asserts input is ReturnType[];
declare const Assertions$2_accessoryPredicate: typeof accessoryPredicate;
declare const Assertions$2_containerColorPredicate: typeof containerColorPredicate;
declare const Assertions$2_descriptionPredicate: typeof descriptionPredicate;
declare const Assertions$2_dividerPredicate: typeof dividerPredicate;
declare const Assertions$2_filePredicate: typeof filePredicate;
declare const Assertions$2_spacingPredicate: typeof spacingPredicate;
declare const Assertions$2_spoilerPredicate: typeof spoilerPredicate;
declare const Assertions$2_textDisplayContentPredicate: typeof textDisplayContentPredicate;
declare const Assertions$2_unfurledMediaItemPredicate: typeof unfurledMediaItemPredicate;
declare const Assertions$2_validateComponentArray: typeof validateComponentArray;
declare namespace Assertions$2 {
export { Assertions$2_componentsValidator as componentsValidator, Assertions$2_titleValidator as titleValidator, validateRequiredParameters$2 as validateRequiredParameters };
export { Assertions$2_accessoryPredicate as accessoryPredicate, assertReturnOfBuilder$1 as assertReturnOfBuilder, Assertions$2_containerColorPredicate as containerColorPredicate, Assertions$2_descriptionPredicate as descriptionPredicate, Assertions$2_dividerPredicate as dividerPredicate, Assertions$2_filePredicate as filePredicate, Assertions$2_spacingPredicate as spacingPredicate, Assertions$2_spoilerPredicate as spoilerPredicate, Assertions$2_textDisplayContentPredicate as textDisplayContentPredicate, Assertions$2_unfurledMediaItemPredicate as unfurledMediaItemPredicate, Assertions$2_validateComponentArray as validateComponentArray };
}
/**
@@ -1843,7 +2411,7 @@ declare function validateDefaultPermission$1(value: unknown): asserts value is b
declare function validateRequired(required: unknown): asserts required is boolean;
declare function validateChoicesLength(amountAdding: number, choices?: APIApplicationCommandOptionChoice[]): void;
declare function assertReturnOfBuilder<ReturnType extends ApplicationCommandOptionBase | SlashCommandSubcommandBuilder | SlashCommandSubcommandGroupBuilder>(input: unknown, ExpectedInstanceOf: new () => ReturnType): asserts input is ReturnType;
declare const localizationMapPredicate: _sapphire_shapeshift.UnionValidator<_sapphire_shapeshift.UndefinedToOptional<Partial<Record<"id" | "en-US" | "en-GB" | "bg" | "zh-CN" | "zh-TW" | "hr" | "cs" | "da" | "nl" | "fi" | "fr" | "de" | "el" | "hi" | "hu" | "it" | "ja" | "ko" | "lt" | "no" | "pl" | "pt-BR" | "ro" | "ru" | "es-ES" | "es-419" | "sv-SE" | "th" | "tr" | "uk" | "vi", string | null>>> | null | undefined>;
declare const localizationMapPredicate: _sapphire_shapeshift.UnionValidator<_sapphire_shapeshift.UndefinedToOptional<Partial<Record<Locale, string | null>>> | null | undefined>;
declare function validateLocalizationMap(value: unknown): asserts value is LocalizationMap;
declare function validateDMPermission$1(value: unknown): asserts value is boolean | null | undefined;
declare function validateDefaultMemberPermissions$1(permissions: unknown): string | null | undefined;
@@ -2040,4 +2608,4 @@ declare function isValidationEnabled(): boolean;
*/
declare const version: string;
export { ActionRowBuilder, type AnyAPIActionRowComponent, type AnyComponentBuilder, ApplicationCommandNumericOptionMinMaxValueMixin, type ApplicationCommandOptionAllowedChannelTypes, ApplicationCommandOptionBase, ApplicationCommandOptionChannelTypesMixin, ApplicationCommandOptionWithAutocompleteMixin, ApplicationCommandOptionWithChoicesMixin, BaseSelectMenuBuilder, ButtonBuilder, ChannelSelectMenuBuilder, Assertions$4 as ComponentAssertions, ComponentBuilder, Assertions as ContextMenuCommandAssertions, ContextMenuCommandBuilder, type ContextMenuCommandType, Assertions$5 as EmbedAssertions, type EmbedAuthorData, type EmbedAuthorOptions, EmbedBuilder, type EmbedFooterData, type EmbedFooterOptions, type EmbedImageData, type IconData, type MappedComponentTypes, MentionableSelectMenuBuilder, type MessageActionRowComponentBuilder, type MessageComponentBuilder, type ModalActionRowComponentBuilder, Assertions$2 as ModalAssertions, ModalBuilder, type ModalComponentBuilder, type RGBTuple, type RestOrArray, RoleSelectMenuBuilder, StringSelectMenuBuilder as SelectMenuBuilder, StringSelectMenuOptionBuilder as SelectMenuOptionBuilder, SharedNameAndDescription, SharedSlashCommand, SharedSlashCommandOptions, SharedSlashCommandSubcommands, Assertions$1 as SlashCommandAssertions, SlashCommandAttachmentOption, SlashCommandBooleanOption, SlashCommandBuilder, SlashCommandChannelOption, SlashCommandIntegerOption, SlashCommandMentionableOption, SlashCommandNumberOption, type SlashCommandOptionsOnlyBuilder, SlashCommandRoleOption, SlashCommandStringOption, SlashCommandSubcommandBuilder, SlashCommandSubcommandGroupBuilder, type SlashCommandSubcommandsOnlyBuilder, SlashCommandUserOption, StringSelectMenuBuilder, StringSelectMenuOptionBuilder, Assertions$3 as TextInputAssertions, TextInputBuilder, type ToAPIApplicationCommandOptions, UserSelectMenuBuilder, createComponentBuilder, disableValidators, embedLength, enableValidators, isValidationEnabled, normalizeArray, version };
export { ActionRowBuilder, type AnyAPIActionRowComponent, type AnyComponentBuilder, ApplicationCommandNumericOptionMinMaxValueMixin, type ApplicationCommandOptionAllowedChannelTypes, ApplicationCommandOptionBase, ApplicationCommandOptionChannelTypesMixin, ApplicationCommandOptionWithAutocompleteMixin, ApplicationCommandOptionWithChoicesMixin, BaseSelectMenuBuilder, ButtonBuilder, ChannelSelectMenuBuilder, Assertions$5 as ComponentAssertions, ComponentBuilder, Assertions$2 as ComponentsV2Assertions, ContainerBuilder, type ContainerComponentBuilder, Assertions as ContextMenuCommandAssertions, ContextMenuCommandBuilder, type ContextMenuCommandType, Assertions$6 as EmbedAssertions, type EmbedAuthorData, type EmbedAuthorOptions, EmbedBuilder, type EmbedFooterData, type EmbedFooterOptions, type EmbedImageData, FileBuilder, type IconData, type MappedComponentTypes, MediaGalleryBuilder, MediaGalleryItemBuilder, MentionableSelectMenuBuilder, type MessageActionRowComponentBuilder, type MessageComponentBuilder, type ModalActionRowComponentBuilder, Assertions$3 as ModalAssertions, ModalBuilder, type ModalComponentBuilder, type RGBTuple, type RestOrArray, RoleSelectMenuBuilder, SectionBuilder, StringSelectMenuBuilder as SelectMenuBuilder, StringSelectMenuOptionBuilder as SelectMenuOptionBuilder, SeparatorBuilder, SharedNameAndDescription, SharedSlashCommand, SharedSlashCommandOptions, SharedSlashCommandSubcommands, Assertions$1 as SlashCommandAssertions, SlashCommandAttachmentOption, SlashCommandBooleanOption, SlashCommandBuilder, SlashCommandChannelOption, SlashCommandIntegerOption, SlashCommandMentionableOption, SlashCommandNumberOption, type SlashCommandOptionsOnlyBuilder, SlashCommandRoleOption, SlashCommandStringOption, SlashCommandSubcommandBuilder, SlashCommandSubcommandGroupBuilder, type SlashCommandSubcommandsOnlyBuilder, SlashCommandUserOption, StringSelectMenuBuilder, StringSelectMenuOptionBuilder, TextDisplayBuilder, Assertions$4 as TextInputAssertions, TextInputBuilder, ThumbnailBuilder, type ToAPIApplicationCommandOptions, UserSelectMenuBuilder, createComponentBuilder, disableValidators, embedLength, enableValidators, isValidationEnabled, normalizeArray, resolveBuilder, version };