Search Results for

    Show / Hide Table of Contents

    Class InteractionResponseBuilder

    Represents a builder class for creating IDiscordInteractionResponses.

    Inheritance
    System.Object
    InteractionResponseBuilder
    Inherited Members
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.ToString()
    Namespace: Color_Chan.Discord.Commands.MessageBuilders
    Assembly: Color-Chan.Discord.Commands.dll
    Syntax
    public class InteractionResponseBuilder

    Methods

    | Improve this Doc View Source

    Build(Nullable<DiscordInteractionCallbackType>)

    Builds a IDiscordInteractionResponse with all the set values.

    Declaration
    public IDiscordInteractionResponse Build(DiscordInteractionCallbackType? type = null)
    Parameters
    Type Name Description
    System.Nullable<DiscordInteractionCallbackType> type

    The type of the response.

    Returns
    Type Description
    IDiscordInteractionResponse

    The build IDiscordInteractionResponse.

    | Improve this Doc View Source

    EmptyComponents()

    Sets the Color_Chan.Discord.Commands.MessageBuilders.InteractionResponseBuilder._components to an empty list of IDiscordComponents.

    Declaration
    public InteractionResponseBuilder EmptyComponents()
    Returns
    Type Description
    InteractionResponseBuilder

    The updated InteractionResponseBuilder.

    | Improve this Doc View Source

    EmptyEmbeds()

    Sets the Color_Chan.Discord.Commands.MessageBuilders.InteractionResponseBuilder._embeds to an empty list of IDiscordEmbeds.

    Declaration
    public InteractionResponseBuilder EmptyEmbeds()
    Returns
    Type Description
    InteractionResponseBuilder

    The updated InteractionResponseBuilder.

    | Improve this Doc View Source

    EnableTts()

    Enables Text To Speech for the response.

    Declaration
    public InteractionResponseBuilder EnableTts()
    Returns
    Type Description
    InteractionResponseBuilder

    The updated InteractionResponseBuilder.

    | Improve this Doc View Source

    MakePrivate()

    Makes the response only visible to the person that has used the slash command.

    Declaration
    public InteractionResponseBuilder MakePrivate()
    Returns
    Type Description
    InteractionResponseBuilder

    The updated InteractionResponseBuilder.

    | Improve this Doc View Source

    WithAllowedMentions(IDiscordAllowedMentions)

    Sets the allowed mentions for the response.

    Declaration
    public InteractionResponseBuilder WithAllowedMentions(IDiscordAllowedMentions allowedMentions)
    Parameters
    Type Name Description
    IDiscordAllowedMentions allowedMentions

    The allowed mentions.

    Returns
    Type Description
    InteractionResponseBuilder

    The updated InteractionResponseBuilder.

    | Improve this Doc View Source

    WithComponent(IDiscordComponent)

    Adds an component to the response.

    Declaration
    public InteractionResponseBuilder WithComponent(IDiscordComponent component)
    Parameters
    Type Name Description
    IDiscordComponent component

    The new component.

    Returns
    Type Description
    InteractionResponseBuilder

    The updated InteractionResponseBuilder.

    Exceptions
    Type Condition
    System.ArgumentOutOfRangeException

    Thrown when the max component limit of 5 has been reached.

    | Improve this Doc View Source

    WithContent(String)

    Adds content to the response.

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

    The content.

    Returns
    Type Description
    InteractionResponseBuilder

    The updated InteractionResponseBuilder.

    | Improve this Doc View Source

    WithEmbed(IDiscordEmbed)

    Adds an embed to the response.

    Declaration
    public InteractionResponseBuilder WithEmbed(IDiscordEmbed embed)
    Parameters
    Type Name Description
    IDiscordEmbed embed

    The embed that will be added.

    Returns
    Type Description
    InteractionResponseBuilder

    The updated InteractionResponseBuilder.

    Exceptions
    Type Condition
    System.ArgumentOutOfRangeException

    Thrown when the max embed limit of 10 has been reached.

    • Improve this Doc
    • View Source
    In This Article
    Back to top Generated by DocFX