Class: Discordrb::Components::TextInput

Inherits:
Object
  • Object
show all
Defined in:
lib/discordrb/data/component.rb

Overview

A free-form text input bar in a modal.

Instance Attribute Summary collapse

Instance Attribute Details

#custom_id ⇒ String (readonly)

Returns the developer-defined identifier for the text input.

Returns:

  • (String) —

    the developer-defined identifier for the text input.



239
240
241
# File 'lib/discordrb/data/component.rb', line 239

def custom_id
  @custom_id
end

#id ⇒ Integer (readonly)

Returns the numeric identifier of the text input.

Returns:

  • (Integer) —

    the numeric identifier of the text input.



229
230
231
# File 'lib/discordrb/data/component.rb', line 229

def id
  @id
end

#style ⇒ Symbol (readonly)

Returns This is deprecated and not accurate. This will be removed in the next major version (4.0.0).

Returns:

  • (Symbol) —

    This is deprecated and not accurate. This will be removed in the next major version (4.0.0).



233
234
235
# File 'lib/discordrb/data/component.rb', line 233

def style
  @style
end

#value ⇒ String? (readonly)

Returns the value the user typed into the text input.

Returns:

  • (String, nil) —

    the value the user typed into the text input.



236
237
238
# File 'lib/discordrb/data/component.rb', line 236

def value
  @value
end