LogoAntiRaid

@discord-types/builders/message/components/textInput

API reference for @discord-types/builders/message/components/textInput

@discord-types/builders/message/components/textInput

Types

TextInput

Raw Type
type TextInput = TextInput.Prototype, & {
	customId: string?,

	style: messageTypes.TextInputStyle?,

	label: string?,

	minLength: number?,

	maxLength: number?,

	required: boolean?,

	value: string?,

	placeholder: string?
}

Intersection with variants:

Variant 2
PropTypeDescription
customId?
-
style?
-
label?
-
minLength?
-
maxLength?
-
required?
-
value?
-
placeholder?
-

JSON

Raw Type
type JSON = apiTypes.TextInputComponentObject

apiTypes.TextInputComponentObject

Functions

TextInput.Prototype.setCustomId

[[

]]

Function Signature
--[[
	
]]
function TextInput.Prototype.setCustomId(self: TextInput, customId: string) -> TextInput end

Arguments

customId

string

Returns

ret1

TextInput

TextInput.Prototype.setStyle

[[

]]

Function Signature
--[[
	
]]
function TextInput.Prototype.setStyle(self: TextInput, style: messageTypes.TextInputStyle) -> TextInput end

Arguments

style

messageTypes.TextInputStyle

Returns

ret1

TextInput

TextInput.Prototype.setLabel

[[

]]

Function Signature
--[[
	
]]
function TextInput.Prototype.setLabel(self: TextInput, label: string) -> TextInput end

Arguments

label

string

Returns

ret1

TextInput

TextInput.Prototype.setMinLength

[[

]]

Function Signature
--[[
	
]]
function TextInput.Prototype.setMinLength(self: TextInput, minLength: number) -> TextInput end

Arguments

minLength

number

Returns

ret1

TextInput

TextInput.Prototype.setMaxLength

[[

]]

Function Signature
--[[
	
]]
function TextInput.Prototype.setMaxLength(self: TextInput, maxLength: number) -> TextInput end

Arguments

maxLength

number

Returns

ret1

TextInput

TextInput.Prototype.setIsRequired

[[

]]

Function Signature
--[[
	
]]
function TextInput.Prototype.setIsRequired(self: TextInput, isRequired: boolean) -> TextInput end

Arguments

isRequired

boolean

Returns

ret1

TextInput

TextInput.Prototype.setValue

[[

]]

Function Signature
--[[
	
]]
function TextInput.Prototype.setValue(self: TextInput, value: string) -> TextInput end

Arguments

value

string

Returns

ret1

TextInput

TextInput.Prototype.setPlaceholder

[[

]]

Function Signature
--[[
	
]]
function TextInput.Prototype.setPlaceholder(self: TextInput, placeholder: string) -> TextInput end

Arguments

placeholder

string

Returns

ret1

TextInput

TextInput.Prototype.build

[[ Responsible for building the TextInput JSON that can be parsed by the Discord API. ]]

Function Signature
--[[
	Responsible for building the TextInput JSON that can be parsed by the Discord API.
]]
function TextInput.Prototype.build(self: TextInput) -> JSON end

Returns

ret1

JSON

TextInput.Interface.new

[[ Responsible for creating a new TextInput.

```lua

``` ]]

Function Signature
--[[
	Responsible for creating a new TextInput.

	\`\`\`lua
	
	\`\`\`
]]
function TextInput.Interface.new(resource: {
		customId: string?,

		style: messageTypes.TextInputStyle?,

		label: string?,

		minLength: number?,

		maxLength: number?,

		required: boolean?,

		value: string?,

		placeholder: string?
	}?) -> TextInput end

Arguments

resource

This field is optional and may not be specified

{customId: string?, style: messageTypes.TextInputStyle?, label: string?, minLength: number?, maxLength: number?, required: boolean?, value: string?, placeholder: string?}?

Returns

ret1

TextInput

Last updated on