mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
types: modals type and doc fixes (#7608)
This commit is contained in:
@@ -41,6 +41,18 @@
|
||||
* @typedef {ActionRowData|ButtonComponentData|SelectMenuComponentData} MessageComponentData
|
||||
/
|
||||
|
||||
/**
|
||||
* @typedef {BaseComponentData} TextInputComponentData
|
||||
* @property {string} customId The custom id of the text input
|
||||
* @property {TextInputStyle} style The style of the text input
|
||||
* @property {string} label The text that appears on top of the text input field
|
||||
* @property {?number} minLength The minimum number of characters that can be entered in the text input
|
||||
* @property {?number} maxLength The maximum number of characters that can be entered in the text input
|
||||
* @property {?boolean} required Whether or not the text input is required or not
|
||||
* @property {?string} value The pre-filled text in the text input
|
||||
* @property {?string} placeholder Placeholder for the text input
|
||||
*/
|
||||
|
||||
/**
|
||||
* @typedef {ActionRowData|ButtonComponentData|SelectMenuComponentData|TextInputComponentData} ComponentData
|
||||
*/
|
||||
|
||||
3
packages/discord.js/typings/index.d.ts
vendored
3
packages/discord.js/typings/index.d.ts
vendored
@@ -1744,6 +1744,7 @@ export interface ModalFieldData {
|
||||
|
||||
export class ModalSubmitFieldsResolver {
|
||||
constructor(components: ModalFieldData[][]);
|
||||
public components: ModalFieldData[][];
|
||||
public fields: Collection<string, ModalFieldData>;
|
||||
public getField(customId: string): ModalFieldData;
|
||||
public getTextInputValue(customId: string): string;
|
||||
@@ -3216,7 +3217,7 @@ export interface TextBasedChannelFields extends PartialTextBasedChannelFields {
|
||||
lastMessageId: Snowflake | null;
|
||||
get lastMessage(): Message | null;
|
||||
lastPinTimestamp: number | null;
|
||||
readonly lastPinAt: Date | null;
|
||||
get lastPinAt(): Date | null;
|
||||
awaitMessageComponent<T extends MessageComponentType = ComponentType.ActionRow>(
|
||||
options?: AwaitMessageCollectorOptionsParams<T, true>,
|
||||
): Promise<MappedInteractionTypes[T]>;
|
||||
|
||||
Reference in New Issue
Block a user