Class TextInput

Represents a text input component

Constructors

Properties

Constructors

  • Creates a new text input

    Parameters

    • name: string

      The name of the text input

    • data: TextInputData

      The data of the text input (builder or raw)

    Returns TextInput

    Example

    module.exports.default = new TextInput('username', {
    customId: 'username',
    label: 'Username',
    placeholder: 'Enter your username...',
    style: TextInputStyle.Short,
    maxLength: 32,
    required: true
    });

    Example

    module.exports.default = new TextInput(
    'username',
    new TextInputBuilder()
    .setCustomId('username')
    .setLabel('Username')
    .setPlaceholder('Enter your username...')
    .setStyle(TextInputStyle.Short)
    .setMaxLength(32)
    .setRequired(true)
    );

Properties

The data of the text input (builder or raw)

name: string

The name of the text input

Generated using TypeDoc