Class MessageCommandContext
- Namespace
- NetCord.Services.ApplicationCommands
- Assembly
- NetCord.Services.dll
Context for handling message command interactions.
public class MessageCommandContext : BaseMessageCommandContext, IApplicationCommandContext, IInteractionContext, IGatewayClientContext, IGuildContext, IChannelContext, IUserContext, IContext
- Inheritance
-
MessageCommandContext
- Implements
- Inherited Members
Constructors
MessageCommandContext(MessageCommandInteraction, GatewayClient)
Context for handling message command interactions.
public MessageCommandContext(MessageCommandInteraction interaction, GatewayClient client)
Parameters
interactionMessageCommandInteractionThe interaction that is being handled. clientGatewayClientThe 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
Client
The GatewayClient associated with the handled command or interaction.
public GatewayClient Client { get; }
Property Value
Guild
Guild in which the handled command or interaction was invoked.
public Guild? Guild { get; }
Property Value
Remarks
May be null if the handled command or interaction was invoked outside of a guild or if the guild has not been cached.
Target
The target message of the message command.
public RestMessage Target { get; }
Property Value
User
User who invoked the handled command or interaction.
public User User { get; }