Skip to main content

Class SocketCommandContext

Represents a WebSocket-based context of a command. This may include the client, guild, channel, user, and message.

Assembly: Discord.Net.WebSocket.dll​
View Source​
Declaration
public class SocketCommandContext : ICommandContext

Properties​

Client​

Gets the Discord.WebSocket.DiscordSocketClient that the command is executed with.

View Source​
Declaration
public DiscordSocketClient Client { get; }

Guild​

Gets the Discord.WebSocket.SocketGuild that the command is executed in.

View Source​
Declaration
public SocketGuild Guild { get; }

Channel​

Gets the Discord.WebSocket.ISocketMessageChannel that the command is executed in.

View Source​
Declaration
public ISocketMessageChannel Channel { get; }

User​

Gets the Discord.WebSocket.SocketUser who executed the command.

View Source​
Declaration
public SocketUser User { get; }

Message​

Gets the Discord.WebSocket.SocketUserMessage that the command is interpreted from.

View Source​
Declaration
public SocketUserMessage Message { get; }

IsPrivate​

Indicates whether the channel that the command is executed in is a private channel.

View Source​
Declaration
public bool IsPrivate { get; }

ICommandContext.Client​

Gets the Discord.IDiscordClient that the command is executed with.

View Source​
Declaration
IDiscordClient ICommandContext.Client { get; }

ICommandContext.Guild​

Gets the Discord.IGuild that the command is executed in.

View Source​
Declaration
IGuild ICommandContext.Guild { get; }

ICommandContext.Channel​

Gets the Discord.IMessageChannel that the command is executed in.

View Source​
Declaration
IMessageChannel ICommandContext.Channel { get; }

ICommandContext.User​

Gets the Discord.IUser who executed the command.

View Source​
Declaration
IUser ICommandContext.User { get; }

ICommandContext.Message​

Gets the Discord.IUserMessage that the command is interpreted from.

View Source​
Declaration
IUserMessage ICommandContext.Message { get; }

Implements​