Search Results for

    Show / Hide Table of Contents

    Class CommandContext

    Represents a context in which a command is executed.

    Inheritance
    System.Object
    CommandContext
    Namespace: DisCatSharp.CommandsNext
    Assembly: DisCatSharp.CommandsNext.dll
    Syntax
    public sealed class CommandContext

    Properties

    | Improve this Doc View Source

    Channel

    Gets the channel in which the execution was triggered,

    Declaration
    public DiscordChannel Channel { get; }
    Property Value
    Type Description
    DiscordChannel
    | Improve this Doc View Source

    Client

    Gets the client which received the message.

    Declaration
    public DiscordClient Client { get; }
    Property Value
    Type Description
    DiscordClient
    | Improve this Doc View Source

    Command

    Gets the command that is being executed.

    Declaration
    public Command Command { get; }
    Property Value
    Type Description
    Command
    | Improve this Doc View Source

    CommandsNext

    Gets the CommandsNext service instance that handled this command.

    Declaration
    public CommandsNextExtension CommandsNext { get; }
    Property Value
    Type Description
    CommandsNextExtension
    | Improve this Doc View Source

    Guild

    Gets the guild in which the execution was triggered. This property is null for commands sent over direct messages.

    Declaration
    public DiscordGuild Guild { get; }
    Property Value
    Type Description
    DiscordGuild
    | Improve this Doc View Source

    Member

    Gets the member who triggered the execution. This property is null for commands sent over direct messages.

    Declaration
    public DiscordMember Member { get; }
    Property Value
    Type Description
    DiscordMember
    | Improve this Doc View Source

    Message

    Gets the message that triggered the execution.

    Declaration
    public DiscordMessage Message { get; }
    Property Value
    Type Description
    DiscordMessage
    | Improve this Doc View Source

    Overload

    Gets the overload of the command that is being executed.

    Declaration
    public CommandOverload Overload { get; }
    Property Value
    Type Description
    CommandOverload
    | Improve this Doc View Source

    Prefix

    Gets the prefix used to invoke the command.

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

    RawArguments

    Gets the list of raw arguments passed to the command.

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

    RawArgumentString

    Gets the raw string from which the arguments were extracted.

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

    Services

    Gets the service provider for this CNext instance.

    Declaration
    public IServiceProvider Services { get; }
    Property Value
    Type Description
    System.IServiceProvider
    | Improve this Doc View Source

    User

    Gets the user who triggered the execution.

    Declaration
    public DiscordUser User { get; }
    Property Value
    Type Description
    DiscordUser

    Methods

    | Improve this Doc View Source

    RespondAsync(DiscordEmbed)

    Quickly respond to the message that triggered the command.

    Declaration
    public Task<DiscordMessage> RespondAsync(DiscordEmbed embed)
    Parameters
    Type Name Description
    DiscordEmbed embed

    Embed to attach.

    Returns
    Type Description
    System.Threading.Tasks.Task<DiscordMessage>
    | Improve this Doc View Source

    RespondAsync(DiscordMessageBuilder)

    Quickly respond to the message that triggered the command.

    Declaration
    public Task<DiscordMessage> RespondAsync(DiscordMessageBuilder builder)
    Parameters
    Type Name Description
    DiscordMessageBuilder builder

    The Discord Message builder.

    Returns
    Type Description
    System.Threading.Tasks.Task<DiscordMessage>
    | Improve this Doc View Source

    RespondAsync(Action<DiscordMessageBuilder>)

    Quickly respond to the message that triggered the command.

    Declaration
    public Task<DiscordMessage> RespondAsync(Action<DiscordMessageBuilder> action)
    Parameters
    Type Name Description
    System.Action<DiscordMessageBuilder> action

    The Discord Message builder.

    Returns
    Type Description
    System.Threading.Tasks.Task<DiscordMessage>
    | Improve this Doc View Source

    RespondAsync(String)

    Quickly respond to the message that triggered the command.

    Declaration
    public Task<DiscordMessage> RespondAsync(string content)
    Parameters
    Type Name Description
    System.String content

    Message to respond with.

    Returns
    Type Description
    System.Threading.Tasks.Task<DiscordMessage>
    | Improve this Doc View Source

    RespondAsync(String, DiscordEmbed)

    Quickly respond to the message that triggered the command.

    Declaration
    public Task<DiscordMessage> RespondAsync(string content, DiscordEmbed embed)
    Parameters
    Type Name Description
    System.String content

    Message to respond with.

    DiscordEmbed embed

    Embed to attach.

    Returns
    Type Description
    System.Threading.Tasks.Task<DiscordMessage>
    | Improve this Doc View Source

    TriggerTypingAsync()

    Triggers typing in the channel containing the message that triggered the command.

    Declaration
    public Task TriggerTypingAsync()
    Returns
    Type Description
    System.Threading.Tasks.Task

    Extension Methods

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