Table of Contents

Class UserCommandContext

Namespace
NetCord.Services.ApplicationCommands
Assembly
NetCord.Services.dll

Context for handling user command interactions.

public class UserCommandContext : BaseUserCommandContext, IApplicationCommandContext, IInteractionContext, IGatewayClientContext, IGuildContext, IChannelContext, IUserContext, IContext
Inheritance
UserCommandContext
Implements
Inherited Members

Constructors

UserCommandContext(UserCommandInteraction, GatewayClient)

Context for handling user command interactions.

public UserCommandContext(UserCommandInteraction interaction, GatewayClient client)

Parameters

interaction UserCommandInteraction
The interaction that is being handled.
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.

Target

The target user of the user command.

public User Target { get; }

Property Value

User

User

User who invoked the handled command or interaction.

public User User { get; }

Property Value

User