Search Results for

    Show / Hide Table of Contents

    Class DiscordFollowupMessageBuilder

    Constructs a followup message to an interaction.

    Inheritance
    System.Object
    DiscordFollowupMessageBuilder
    Namespace: DisCatSharp.Entities
    Assembly: DisCatSharp.dll
    Syntax
    public sealed class DiscordFollowupMessageBuilder

    Properties

    | Improve this Doc View Source

    Components

    Components to send on this followup message.

    Declaration
    public IReadOnlyList<DiscordActionRowComponent> Components { get; }
    Property Value
    Type Description
    System.Collections.Generic.IReadOnlyList<DiscordActionRowComponent>
    | Improve this Doc View Source

    Content

    Message to send on followup message.

    Declaration
    public string Content { get; set; }
    Property Value
    Type Description
    System.String
    | Improve this Doc View Source

    Embeds

    Embeds to send on followup message.

    Declaration
    public IReadOnlyList<DiscordEmbed> Embeds { get; }
    Property Value
    Type Description
    System.Collections.Generic.IReadOnlyList<DiscordEmbed>
    | Improve this Doc View Source

    Files

    Files to send on this followup message.

    Declaration
    public IReadOnlyList<DiscordMessageFile> Files { get; }
    Property Value
    Type Description
    System.Collections.Generic.IReadOnlyList<DiscordMessageFile>
    | Improve this Doc View Source

    IsEphemeral

    Whether this followup message should be ephemeral.

    Declaration
    public bool IsEphemeral { get; set; }
    Property Value
    Type Description
    System.Boolean
    | Improve this Doc View Source

    IsTts

    Whether this followup message is text-to-speech.

    Declaration
    public bool IsTts { get; set; }
    Property Value
    Type Description
    System.Boolean
    | Improve this Doc View Source

    Mentions

    Mentions to send on this followup message.

    Declaration
    public IReadOnlyList<IMention> Mentions { get; }
    Property Value
    Type Description
    System.Collections.Generic.IReadOnlyList<IMention>

    Methods

    | Improve this Doc View Source

    AddComponents(DiscordComponent[])

    Appends a collection of components to the message.

    Declaration
    public DiscordFollowupMessageBuilder AddComponents(params DiscordComponent[] components)
    Parameters
    Type Name Description
    DiscordComponent[] components

    The collection of components to add.

    Returns
    Type Description
    DiscordFollowupMessageBuilder

    The builder to chain calls with.

    Exceptions
    Type Condition
    System.ArgumentException

    components contained more than 5 components.

    | Improve this Doc View Source

    AddComponents(IEnumerable<DiscordActionRowComponent>)

    Appends several rows of components to the message

    Declaration
    public DiscordFollowupMessageBuilder AddComponents(IEnumerable<DiscordActionRowComponent> components)
    Parameters
    Type Name Description
    System.Collections.Generic.IEnumerable<DiscordActionRowComponent> components

    The rows of components to add, holding up to five each.

    Returns
    Type Description
    DiscordFollowupMessageBuilder
    | Improve this Doc View Source

    AddComponents(IEnumerable<DiscordComponent>)

    Appends a collection of components to the message.

    Declaration
    public DiscordFollowupMessageBuilder AddComponents(IEnumerable<DiscordComponent> components)
    Parameters
    Type Name Description
    System.Collections.Generic.IEnumerable<DiscordComponent> components

    The collection of components to add.

    Returns
    Type Description
    DiscordFollowupMessageBuilder

    The builder to chain calls with.

    Exceptions
    Type Condition
    System.ArgumentException

    components contained more than 5 components.

    | Improve this Doc View Source

    AddEmbed(DiscordEmbed)

    Adds an embed to the followup message.

    Declaration
    public DiscordFollowupMessageBuilder AddEmbed(DiscordEmbed embed)
    Parameters
    Type Name Description
    DiscordEmbed embed

    Embed to add.

    Returns
    Type Description
    DiscordFollowupMessageBuilder

    The builder to chain calls with.

    | Improve this Doc View Source

    AddEmbeds(IEnumerable<DiscordEmbed>)

    Adds the given embeds to the followup message.

    Declaration
    public DiscordFollowupMessageBuilder AddEmbeds(IEnumerable<DiscordEmbed> embeds)
    Parameters
    Type Name Description
    System.Collections.Generic.IEnumerable<DiscordEmbed> embeds

    Embeds to add.

    Returns
    Type Description
    DiscordFollowupMessageBuilder

    The builder to chain calls with.

    | Improve this Doc View Source

    AddFile(FileStream, Boolean, String)

    Sets if the message has files to be sent.

    Declaration
    public DiscordFollowupMessageBuilder AddFile(FileStream stream, bool resetStreamPosition = false, string description = null)
    Parameters
    Type Name Description
    System.IO.FileStream stream

    The Stream to the file.

    System.Boolean resetStreamPosition

    Tells the API Client to reset the stream position to what it was after the file is sent.

    System.String description

    Description of the file.

    Returns
    Type Description
    DiscordFollowupMessageBuilder

    The builder to chain calls with.

    | Improve this Doc View Source

    AddFile(String, Stream, Boolean, String)

    Adds a file to the followup message.

    Declaration
    public DiscordFollowupMessageBuilder AddFile(string filename, Stream data, bool resetStreamPosition = false, string description = null)
    Parameters
    Type Name Description
    System.String filename

    Name of the file.

    System.IO.Stream data

    File data.

    System.Boolean resetStreamPosition

    Tells the API Client to reset the stream position to what it was after the file is sent.

    System.String description

    Description of the file.

    Returns
    Type Description
    DiscordFollowupMessageBuilder

    The builder to chain calls with.

    | Improve this Doc View Source

    AddFiles(Dictionary<String, Stream>, Boolean)

    Adds the given files to the followup message.

    Declaration
    public DiscordFollowupMessageBuilder AddFiles(Dictionary<string, Stream> files, bool resetStreamPosition = false)
    Parameters
    Type Name Description
    System.Collections.Generic.Dictionary<System.String, System.IO.Stream> files

    Dictionary of file name and file data.

    System.Boolean resetStreamPosition

    Tells the API Client to reset the stream position to what it was after the file is sent.

    Returns
    Type Description
    DiscordFollowupMessageBuilder

    The builder to chain calls with.

    | Improve this Doc View Source

    AddMention(IMention)

    Adds the mention to the mentions to parse, etc. with the followup message.

    Declaration
    public DiscordFollowupMessageBuilder AddMention(IMention mention)
    Parameters
    Type Name Description
    IMention mention

    Mention to add.

    Returns
    Type Description
    DiscordFollowupMessageBuilder

    The builder to chain calls with.

    | Improve this Doc View Source

    AddMentions(IEnumerable<IMention>)

    Adds the mentions to the mentions to parse, etc. with the followup message.

    Declaration
    public DiscordFollowupMessageBuilder AddMentions(IEnumerable<IMention> mentions)
    Parameters
    Type Name Description
    System.Collections.Generic.IEnumerable<IMention> mentions

    Mentions to add.

    Returns
    Type Description
    DiscordFollowupMessageBuilder

    The builder to chain calls with.

    | Improve this Doc View Source

    AsEphemeral(Boolean)

    Sets the followup message to be ephemeral.

    Declaration
    public DiscordFollowupMessageBuilder AsEphemeral(bool ephemeral = true)
    Parameters
    Type Name Description
    System.Boolean ephemeral

    Whether the followup should be ephemeral. Defaults to true.

    Returns
    Type Description
    DiscordFollowupMessageBuilder
    | Improve this Doc View Source

    Clear()

    Allows for clearing the Followup Message builder so that it can be used again to send a new message.

    Declaration
    public void Clear()
    | Improve this Doc View Source

    ClearComponents()

    Clears all message components on this builder.

    Declaration
    public void ClearComponents()
    | Improve this Doc View Source

    WithContent(String)

    Sets the message to send with the followup message..

    Declaration
    public DiscordFollowupMessageBuilder WithContent(string content)
    Parameters
    Type Name Description
    System.String content

    Message to send.

    Returns
    Type Description
    DiscordFollowupMessageBuilder

    The builder to chain calls with.

    | Improve this Doc View Source

    WithTts(Boolean)

    Indicates if the followup message must use text-to-speech.

    Declaration
    public DiscordFollowupMessageBuilder WithTts(bool tts)
    Parameters
    Type Name Description
    System.Boolean tts

    Text-to-speech

    Returns
    Type Description
    DiscordFollowupMessageBuilder

    The builder to chain calls with.

    Extension Methods

    ReflectionUtilities.ToDictionary<T>(T)
    • Improve this Doc
    • View Source
    In This Article
    Back to top © 2021-2022 Aiko IT Systems