Search Results for

    Show / Hide Table of Contents

    Class RestModal

    Represents a user submitted Modal.

    Inheritance
    Object
    RestEntity<UInt64>
    RestInteraction
    RestModal
    Implements
    IEntity<UInt64>
    IModalInteraction
    IDiscordInteraction
    ISnowflakeEntity
    IEntity<UInt64>
    Inherited Members
    RestInteraction.Type
    RestInteraction.Token
    RestInteraction.Version
    RestInteraction.User
    RestInteraction.UserLocale
    RestInteraction.GuildLocale
    RestInteraction.CreatedAt
    RestInteraction.IsValidToken
    RestInteraction.Channel
    RestInteraction.ChannelId
    RestInteraction.Guild
    RestInteraction.GuildId
    RestInteraction.HasResponded
    RestInteraction.IsDMInteraction
    RestInteraction.ApplicationId
    RestInteraction.GetChannelAsync(RequestOptions)
    RestInteraction.GetGuildAsync(RequestOptions)
    RestInteraction.GetOriginalResponseAsync(RequestOptions)
    RestInteraction.ModifyOriginalResponseAsync(Action<MessageProperties>, RequestOptions)
    RestInteraction.DeleteOriginalResponseAsync(RequestOptions)
    RestInteraction.IDiscordInteraction.User
    RestEntity<UInt64>.Id
    Namespace: Discord.Rest
    Assembly: Discord.Net.Rest.dll
    Syntax
    public class RestModal : RestInteraction, IEntity<ulong>, IModalInteraction, IDiscordInteraction, ISnowflakeEntity, IEntity<ulong>

    Properties

    | Improve this Doc View Source

    Data

    Declaration
    public RestModalData Data { get; set; }
    Property Value
    Type Description
    RestModalData

    Methods

    | Improve this Doc View Source

    Defer(Boolean, RequestOptions)

    Acknowledges this interaction with the DeferredChannelMessageWithSource.

    Declaration
    public override string Defer(bool ephemeral = false, RequestOptions options = null)
    Parameters
    Type Name Description
    Boolean ephemeral
    RequestOptions options
    Returns
    Type Description
    String

    A string that contains json to write back to the incoming http request.

    Overrides
    RestInteraction.Defer(Boolean, RequestOptions)
    | Improve this Doc View Source

    FollowupAsync(String, Embed[], Boolean, Boolean, AllowedMentions, MessageComponent, Embed, RequestOptions)

    Sends a followup message for this interaction.

    Declaration
    public override async Task<RestFollowupMessage> FollowupAsync(string text = null, Embed[] embeds = null, bool isTTS = false, bool ephemeral = false, AllowedMentions allowedMentions = null, MessageComponent component = null, Embed embed = null, RequestOptions options = null)
    Parameters
    Type Name Description
    String text

    The text of the message to be sent.

    Embed[] embeds

    A array of embeds to send with this response. Max 10.

    Boolean isTTS

    true if the message should be read out by a text-to-speech reader, otherwise false.

    Boolean ephemeral

    true if the response should be hidden to everyone besides the invoker of the command, otherwise false.

    AllowedMentions allowedMentions

    The allowed mentions for this response.

    MessageComponent component

    A MessageComponent to be sent with this response.

    Embed embed

    A single embed to send with this response. If this is passed alongside an array of embeds, the single embed will be ignored.

    RequestOptions options

    The request options for this response.

    Returns
    Type Description
    Task<RestFollowupMessage>

    The sent message.

    Overrides
    RestInteraction.FollowupAsync(String, Embed[], Boolean, Boolean, AllowedMentions, MessageComponent, Embed, RequestOptions)
    | Improve this Doc View Source

    FollowupWithFileAsync(FileAttachment, String, Embed[], Boolean, Boolean, AllowedMentions, MessageComponent, Embed, RequestOptions)

    Sends a followup message for this interaction.

    Declaration
    public override Task<RestFollowupMessage> FollowupWithFileAsync(FileAttachment attachment, string text = null, Embed[] embeds = null, bool isTTS = false, bool ephemeral = false, AllowedMentions allowedMentions = null, MessageComponent components = null, Embed embed = null, RequestOptions options = null)
    Parameters
    Type Name Description
    FileAttachment attachment

    The attachment containing the file and description.

    String text

    The text of the message to be sent.

    Embed[] embeds

    A array of embeds to send with this response. Max 10.

    Boolean isTTS

    true if the message should be read out by a text-to-speech reader, otherwise false.

    Boolean ephemeral

    true if the response should be hidden to everyone besides the invoker of the command, otherwise false.

    AllowedMentions allowedMentions

    The allowed mentions for this response.

    MessageComponent components

    A MessageComponent to be sent with this response.

    Embed embed

    A single embed to send with this response. If this is passed alongside an array of embeds, the single embed will be ignored.

    RequestOptions options

    The request options for this response.

    Returns
    Type Description
    Task<RestFollowupMessage>

    A task that represents an asynchronous send operation for delivering the message. The task result contains the sent message.

    Overrides
    RestInteraction.FollowupWithFileAsync(FileAttachment, String, Embed[], Boolean, Boolean, AllowedMentions, MessageComponent, Embed, RequestOptions)
    | Improve this Doc View Source

    FollowupWithFileAsync(Stream, String, String, Embed[], Boolean, Boolean, AllowedMentions, MessageComponent, Embed, RequestOptions)

    Sends a followup message for this interaction.

    Declaration
    public override async Task<RestFollowupMessage> FollowupWithFileAsync(Stream fileStream, string fileName, string text = null, Embed[] embeds = null, bool isTTS = false, bool ephemeral = false, AllowedMentions allowedMentions = null, MessageComponent component = null, Embed embed = null, RequestOptions options = null)
    Parameters
    Type Name Description
    Stream fileStream

    The file to upload.

    String fileName

    The file name of the attachment.

    String text

    The text of the message to be sent.

    Embed[] embeds

    A array of embeds to send with this response. Max 10.

    Boolean isTTS

    true if the message should be read out by a text-to-speech reader, otherwise false.

    Boolean ephemeral

    true if the response should be hidden to everyone besides the invoker of the command, otherwise false.

    AllowedMentions allowedMentions

    The allowed mentions for this response.

    MessageComponent component

    A MessageComponent to be sent with this response.

    Embed embed

    A single embed to send with this response. If this is passed alongside an array of embeds, the single embed will be ignored.

    RequestOptions options

    The request options for this response.

    Returns
    Type Description
    Task<RestFollowupMessage>

    The sent message.

    Overrides
    RestInteraction.FollowupWithFileAsync(Stream, String, String, Embed[], Boolean, Boolean, AllowedMentions, MessageComponent, Embed, RequestOptions)
    | Improve this Doc View Source

    FollowupWithFileAsync(String, String, String, Embed[], Boolean, Boolean, AllowedMentions, MessageComponent, Embed, RequestOptions)

    Sends a followup message for this interaction.

    Declaration
    public override async Task<RestFollowupMessage> FollowupWithFileAsync(string filePath, string text = null, string fileName = null, Embed[] embeds = null, bool isTTS = false, bool ephemeral = false, AllowedMentions allowedMentions = null, MessageComponent component = null, Embed embed = null, RequestOptions options = null)
    Parameters
    Type Name Description
    String filePath

    The file to upload.

    String text

    The text of the message to be sent.

    String fileName

    The file name of the attachment.

    Embed[] embeds

    A array of embeds to send with this response. Max 10.

    Boolean isTTS

    true if the message should be read out by a text-to-speech reader, otherwise false.

    Boolean ephemeral

    true if the response should be hidden to everyone besides the invoker of the command, otherwise false.

    AllowedMentions allowedMentions

    The allowed mentions for this response.

    MessageComponent component

    A MessageComponent to be sent with this response.

    Embed embed

    A single embed to send with this response. If this is passed alongside an array of embeds, the single embed will be ignored.

    RequestOptions options

    The request options for this response.

    Returns
    Type Description
    Task<RestFollowupMessage>

    The sent message.

    Overrides
    RestInteraction.FollowupWithFileAsync(String, String, String, Embed[], Boolean, Boolean, AllowedMentions, MessageComponent, Embed, RequestOptions)
    | Improve this Doc View Source

    FollowupWithFilesAsync(IEnumerable<FileAttachment>, String, Embed[], Boolean, Boolean, AllowedMentions, MessageComponent, Embed, RequestOptions)

    Sends a followup message for this interaction.

    Declaration
    public override async Task<RestFollowupMessage> FollowupWithFilesAsync(IEnumerable<FileAttachment> attachments, string text = null, Embed[] embeds = null, bool isTTS = false, bool ephemeral = false, AllowedMentions allowedMentions = null, MessageComponent components = null, Embed embed = null, RequestOptions options = null)
    Parameters
    Type Name Description
    IEnumerable<FileAttachment> attachments

    A collection of attachments to upload.

    String text

    The text of the message to be sent.

    Embed[] embeds

    A array of embeds to send with this response. Max 10.

    Boolean isTTS

    true if the message should be read out by a text-to-speech reader, otherwise false.

    Boolean ephemeral

    true if the response should be hidden to everyone besides the invoker of the command, otherwise false.

    AllowedMentions allowedMentions

    The allowed mentions for this response.

    MessageComponent components

    A MessageComponent to be sent with this response.

    Embed embed

    A single embed to send with this response. If this is passed alongside an array of embeds, the single embed will be ignored.

    RequestOptions options

    The request options for this response.

    Returns
    Type Description
    Task<RestFollowupMessage>

    A task that represents an asynchronous send operation for delivering the message. The task result contains the sent message.

    Overrides
    RestInteraction.FollowupWithFilesAsync(IEnumerable<FileAttachment>, String, Embed[], Boolean, Boolean, AllowedMentions, MessageComponent, Embed, RequestOptions)
    | Improve this Doc View Source

    Respond(String, Embed[], Boolean, Boolean, AllowedMentions, MessageComponent, Embed, RequestOptions)

    Responds to an Interaction with type ChannelMessageWithSource.

    Declaration
    public override string Respond(string text = null, Embed[] embeds = null, bool isTTS = false, bool ephemeral = false, AllowedMentions allowedMentions = null, MessageComponent component = null, Embed embed = null, RequestOptions options = null)
    Parameters
    Type Name Description
    String text

    The text of the message to be sent.

    Embed[] embeds

    A array of embeds to send with this response. Max 10.

    Boolean isTTS

    true if the message should be read out by a text-to-speech reader, otherwise false.

    Boolean ephemeral

    true if the response should be hidden to everyone besides the invoker of the command, otherwise false.

    AllowedMentions allowedMentions

    The allowed mentions for this response.

    MessageComponent component

    A MessageComponent to be sent with this response.

    Embed embed

    A single embed to send with this response. If this is passed alongside an array of embeds, the single embed will be ignored.

    RequestOptions options

    The request options for this response.

    Returns
    Type Description
    String

    A string that contains json to write back to the incoming http request.

    Overrides
    RestInteraction.Respond(String, Embed[], Boolean, Boolean, AllowedMentions, MessageComponent, Embed, RequestOptions)
    | Improve this Doc View Source

    RespondWithModal(Modal, RequestOptions)

    Declaration
    public override string RespondWithModal(Modal modal, RequestOptions requestOptions = null)
    Parameters
    Type Name Description
    Modal modal
    RequestOptions requestOptions
    Returns
    Type Description
    String
    Overrides
    RestInteraction.RespondWithModal(Modal, RequestOptions)

    Explicit Interface Implementations

    | Improve this Doc View Source

    IModalInteraction.Data

    Declaration
    IModalInteractionData IModalInteraction.Data { get; }
    Returns
    Type Description
    IModalInteractionData

    Implements

    IEntity<TId>
    IModalInteraction
    IDiscordInteraction
    ISnowflakeEntity
    IEntity<TId>

    Extension Methods

    RestExtensions.RespondWithModal<T>(RestInteraction, String, RequestOptions, Action<ModalBuilder>)

    Theme

    • Improve this Doc
    • View Source
    In This Article
    Back to top Discord.Net (c) 2015-2022 3.7.2