Module: Discorb::Interaction::ModalResponder
- Included in:
- CommandInteraction, MessageComponentInteraction
- Defined in:
- lib/discorb/interaction/response.rb
Overview
A module for response with modal.
Instance Method Summary collapse
-
#show_modal(title, custom_id, components) -> Async::Task<void>
Response with
MODAL
(9
).
Instance Method Details
#show_modal(title, custom_id, components) -> Async::Task<void>
Response with MODAL
(9
).
315 316 317 318 319 320 321 322 323 324 325 326 327 |
# File 'lib/discorb/interaction/response.rb', line 315 def show_modal(title, custom_id, components) Async do payload = { title: title, custom_id: custom_id, components: Component.to_payload(components) } @client.http.request( Route.new( "/interactions/#{@id}/#{@token}/callback", "//interactions/:interaction_id/:token/callback", :post ), { type: 9, data: payload } ).wait end end |