Class: Discordrb::Webhooks::Modal
- Inherits:
-
Object
- Object
- Discordrb::Webhooks::Modal
- Defined in:
- lib/discordrb/webhooks/modal.rb
Overview
Modal component builder.
Defined Under Namespace
Classes: GroupBuilder, LabelBuilder
Constant Summary collapse
- COMPONENT_TYPES =
A mapping of names to types of components usable in a modal.
{ action_row: 1, string_select: 3, text_input: 4, user_select: 5, role_select: 6, mentionable_select: 7, channel_select: 8, text_display: 10, label: 18, file_upload: 19, radio_group: 21, checkbox_group: 22, checkbox: 23 }.freeze
- RowBuilder =
Deprecated.
This alias will be removed in future releases.
LabelBuilder
Instance Method Summary collapse
-
#label ⇒ Object
(also: #row)
Add a label component to the view.
-
#text_display ⇒ Object
Add a text display component to the view.
Instance Method Details
#label ⇒ Object Also known as: row
Add a label component to the view.
265 266 267 |
# File 'lib/discordrb/webhooks/modal.rb', line 265 def label(...) @components << LabelBuilder.new(...) end |
#text_display ⇒ Object
Add a text display component to the view.
271 272 273 |
# File 'lib/discordrb/webhooks/modal.rb', line 271 def text_display(...) @components << Discordrb::Webhooks::View::TextDisplayBuilder.new(...) end |