Sha256: e43e857e588f86eb1fdbdf5bfc88c79adccee905ea0e9440d0d4791bde193c40
Contents?: true
Size: 1.78 KB
Versions: 2
Compression:
Stored size: 1.78 KB
Contents
module Discorb # # Represents a modal interaction. class ModalInteraction < Discorb::Interaction include Discorb::Interaction::SourceResponder # # Response with `DEFERRED_CHANNEL_MESSAGE_WITH_SOURCE`(`5`). # # @async # # @param [Boolean] ephemeral Whether to make the response ephemeral. # # @return [Async::Task<void>] The task. def defer_source: (?ephemeral: bool) -> Async::Task[void] # # Response with `CHANNEL_MESSAGE_WITH_SOURCE`(`4`). # # @async # # @param [String] content The content of the response. # @param [Boolean] tts Whether to send the message as text-to-speech. # @param [Discorb::Embed] embed The embed to send. # @param [Array<Discorb::Embed>] embeds The embeds to send. (max: 10) # @param [Discorb::AllowedMentions] allowed_mentions The allowed mentions to send. # @param [Array<Discorb::Component>, Array<Array<Discorb::Component>>] components The components to send. # @param [Boolean] ephemeral Whether to make the response ephemeral. # # @return [Discorb::Interaction::SourceResponder::CallbackMessage, Discorb::Webhook::Message] # The callback message. def post: ( ?String? content, ?tts: bool, ?embed: Discorb::Embed?, ?embeds: ::Array[Discorb::Embed]?, ?allowed_mentions: Discorb::AllowedMentions?, ?components: (::Array[Discorb::Component] | ::Array[::Array[Discorb::Component]])?, ?ephemeral: bool ) -> (Discorb::Interaction::CallbackMessage | Discorb::Webhook::Message) # @return [String] The custom id of the modal. attr_reader custom_id: String # @return [{String => String}] The contents of the modal. attr_reader contents: ::Hash[String, String] end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
discorb-0.20.0 | sig/discorb/interaction/modal.rbs |
discorb-0.19.0 | sig/discorb/interaction/modal.rbs |