Class: Discordrb::Components::TextInput
- Inherits:
-
Object
- Object
- Discordrb::Components::TextInput
- Defined in:
- lib/discordrb/data/component.rb
Overview
Text input component for use in modals. Can be either a line (short
), or a multi line (paragraph
) block.
Constant Summary collapse
- SHORT =
Single line text input
1
- PARAGRAPH =
Multi-line text input
2
Instance Attribute Summary collapse
- #custom_id ⇒ String readonly
- #label ⇒ String readonly
- #max_length ⇒ Integer? readonly
- #min_length ⇒ Integer? readonly
- #placeholder ⇒ String? readonly
- #required ⇒ true, false readonly
- #style ⇒ Symbol readonly
- #value ⇒ String? readonly
Instance Method Summary collapse
Instance Attribute Details
#custom_id ⇒ String (readonly)
180 181 182 |
# File 'lib/discordrb/data/component.rb', line 180 def custom_id @custom_id end |
#label ⇒ String (readonly)
186 187 188 |
# File 'lib/discordrb/data/component.rb', line 186 def label @label end |
#max_length ⇒ Integer? (readonly)
192 193 194 |
# File 'lib/discordrb/data/component.rb', line 192 def max_length @max_length end |
#min_length ⇒ Integer? (readonly)
189 190 191 |
# File 'lib/discordrb/data/component.rb', line 189 def min_length @min_length end |
#placeholder ⇒ String? (readonly)
201 202 203 |
# File 'lib/discordrb/data/component.rb', line 201 def placeholder @placeholder end |
#required ⇒ true, false (readonly)
195 196 197 |
# File 'lib/discordrb/data/component.rb', line 195 def required @required end |
#style ⇒ Symbol (readonly)
183 184 185 |
# File 'lib/discordrb/data/component.rb', line 183 def style @style end |
#value ⇒ String? (readonly)
198 199 200 |
# File 'lib/discordrb/data/component.rb', line 198 def value @value end |
Instance Method Details
#paragraph? ⇒ Boolean
220 221 222 |
# File 'lib/discordrb/data/component.rb', line 220 def paragraph? @style == :paragraph end |
#required? ⇒ Boolean
224 225 226 |
# File 'lib/discordrb/data/component.rb', line 224 def required? @required end |
#short? ⇒ Boolean
216 217 218 |
# File 'lib/discordrb/data/component.rb', line 216 def short? @style == :short end |