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​
public class SocketCommandContext : ICommandContext
Properties​
Client​
Gets the Discord.WebSocket.DiscordSocketClient that the command is executed with.
View Source​
public DiscordSocketClient Client { get; }
Guild​
Gets the Discord.WebSocket.SocketGuild that the command is executed in.
View Source​
public SocketGuild Guild { get; }
Channel​
Gets the Discord.WebSocket.ISocketMessageChannel that the command is executed in.
View Source​
public ISocketMessageChannel Channel { get; }
User​
Gets the Discord.WebSocket.SocketUser who executed the command.
View Source​
public SocketUser User { get; }
Message​
Gets the Discord.WebSocket.SocketUserMessage that the command is interpreted from.
View Source​
public SocketUserMessage Message { get; }
IsPrivate​
Indicates whether the channel that the command is executed in is a private channel.
View Source​
public bool IsPrivate { get; }
ICommandContext.Client​
Gets the Discord.IDiscordClient that the command is executed with.
View Source​
IDiscordClient ICommandContext.Client { get; }
ICommandContext.Guild​
Gets the Discord.IGuild that the command is executed in.
View Source​
IGuild ICommandContext.Guild { get; }
ICommandContext.Channel​
Gets the Discord.IMessageChannel that the command is executed in.
View Source​
IMessageChannel ICommandContext.Channel { get; }
ICommandContext.User​
Gets the Discord.IUser who executed the command.
View Source​
IUser ICommandContext.User { get; }
ICommandContext.Message​
Gets the Discord.IUserMessage that the command is interpreted from.
View Source​
IUserMessage ICommandContext.Message { get; }