Table of Contents

Class CommandContext

Namespace
NetCord.Services.Commands
Assembly
NetCord.Services.dll

Context for handling text-based commands.

public class CommandContext : BaseCommandContext, ICommandContext, IRestMessageContext, IGatewayClientContext, IGuildContext, IChannelContext, IUserContext, IContext
Inheritance
CommandContext
Implements
Inherited Members

Constructors

CommandContext(Message, GatewayClient)

Context for handling text-based commands.

public CommandContext(Message message, GatewayClient client)

Parameters

message Message
The message that triggered the command.
client GatewayClient
The GatewayClient associated with the handled command or interaction.

Properties

Channel

Channel in which the handled command or interaction was invoked.

public TextChannel? Channel { get; }

Property Value

TextChannel

Client

The GatewayClient associated with the handled command or interaction.

public GatewayClient Client { get; }

Property Value

GatewayClient

Guild

Guild in which the handled command or interaction was invoked.

public Guild? Guild { get; }

Property Value

Guild

Remarks

May be null if the handled command or interaction was invoked outside of a guild or if the guild has not been cached.

User

User who invoked the handled command or interaction.

public User User { get; }

Property Value

User