Module: RubyCord::Interaction::ModalResponder
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
).
343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 |
# File 'lib/rubycord/interaction/response.rb', line 343 def show_modal(title, custom_id, components) Async do payload = { title:, custom_id:, components: Component.to_payload(components) } @client .http .request( RubyCord::Internal::Route.new( "/interactions/#{@id}/#{@token}/callback", "//interactions/:interaction_id/:token/callback", :post ), { type: 9, data: payload } ) .wait end end |