Search Results for

    Show / Hide Table of Contents

    Class InteractionModuleBase

    The base of all interaction modules.

    Inheritance
    System.Object
    InteractionModuleBase
    ComponentInteractionModule
    SlashCommandModule
    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.Modules
    Assembly: Color-Chan.Discord.Commands.dll
    Syntax
    public class InteractionModuleBase

    Methods

    | Improve this Doc View Source

    FromError(ErrorResult)

    Create a result object describing an error.

    Declaration
    protected static Result<IDiscordInteractionResponse> FromError(ErrorResult errorResult)
    Parameters
    Type Name Description
    ErrorResult errorResult

    The ErrorResult containing the details of the error.

    Returns
    Type Description
    Result<IDiscordInteractionResponse>

    Result<T> of IDiscordInteractionResponse containing the error result.

    | Improve this Doc View Source

    FromError(String)

    Creates a result object with an ErrorResult containing the given errorMessage.

    Declaration
    protected static Result<IDiscordInteractionResponse> FromError(string errorMessage)
    Parameters
    Type Name Description
    System.String errorMessage

    The error details.

    Returns
    Type Description
    Result<IDiscordInteractionResponse>

    Result<T> of IDiscordInteractionResponse containing the error result.

    | Improve this Doc View Source

    FromSuccess(IDiscordEmbed, Boolean)

    Create a result object from a IDiscordEmbed.

    Declaration
    protected static Result<IDiscordInteractionResponse> FromSuccess(IDiscordEmbed embed, bool isPrivate = false)
    Parameters
    Type Name Description
    IDiscordEmbed embed

    The embed that will be returned to discord.

    System.Boolean isPrivate

    Whether or not the message should be private.

    Returns
    Type Description
    Result<IDiscordInteractionResponse>

    Result<T> of IDiscordInteractionResponse containing the response.

    | Improve this Doc View Source

    FromSuccess(IDiscordInteractionResponse)

    Create a result object from a IDiscordInteractionResponse.

    Declaration
    protected static Result<IDiscordInteractionResponse> FromSuccess(IDiscordInteractionResponse response)
    Parameters
    Type Name Description
    IDiscordInteractionResponse response

    The response that will be send to discord.

    Returns
    Type Description
    Result<IDiscordInteractionResponse>

    Result of IDiscordInteractionResponse containing the response.

    | Improve this Doc View Source

    FromSuccess(String, Boolean)

    Create a result object from a content string.

    Declaration
    protected static Result<IDiscordInteractionResponse> FromSuccess(string content, bool isPrivate = false)
    Parameters
    Type Name Description
    System.String content

    The content of the message.

    System.Boolean isPrivate

    Whether or not the message should be private.

    Returns
    Type Description
    Result<IDiscordInteractionResponse>

    Result<T> of IDiscordInteractionResponse containing the response.

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