Class BaseContext
- Namespace
- DSharpPlus.SlashCommands
- Assembly
- DSharpPlus.SlashCommands.dll
Represents a base context for application command contexts.
public class BaseContext
- Inheritance
-
objectBaseContext
- Derived
Properties
- Channel
Gets the channel this interaction was executed in.
- Client
Gets the client for this interaction.
- CommandName
Gets the name of the command.
- Guild
Gets the guild this interaction was executed in.
- Interaction
Gets the interaction that was created.
- InteractionId
Gets the id for this interaction.
- Member
Gets the member which executed this interaction, or null if the command is in a DM.
- QualifiedName
Gets the qualified name of the command.
- Services
Gets the service provider.
This allows passing data around without resorting to static members.
Defaults to null.
- SlashCommandsExtension
Gets the slash command module this interaction was created in.
- Token
Gets the token for this interaction.
- Type
Gets the type of this interaction.
- User
Gets the user which executed this interaction.
Methods
- CreateResponseAsync(DiscordEmbed, bool)
Creates a response to this interaction.
You must create a response within 3 seconds of this interaction being executed; if the command has the potential to take more than 3 seconds, use DeferAsync(bool) at the start, and edit the response later.
- CreateResponseAsync(DiscordInteractionResponseBuilder)
Creates a response to this interaction.
You must create a response within 3 seconds of this interaction being executed; if the command has the potential to take more than 3 seconds, use DeferAsync(bool) at the start, and edit the response later.
- CreateResponseAsync(DiscordInteractionResponseType, DiscordInteractionResponseBuilder)
Creates a response to this interaction.
You must create a response within 3 seconds of this interaction being executed; if the command has the potential to take more than 3 seconds, use DeferAsync(bool) at the start, and edit the response later.
- CreateResponseAsync(string, DiscordEmbed, bool)
Creates a response to this interaction.
You must create a response within 3 seconds of this interaction being executed; if the command has the potential to take more than 3 seconds, use DeferAsync(bool) at the start, and edit the response later.
- CreateResponseAsync(string, bool)
Creates a response to this interaction.
You must create a response within 3 seconds of this interaction being executed; if the command has the potential to take more than 3 seconds, use DeferAsync(bool) at the start, and edit the response later.
- DeferAsync(bool)
Creates a deferred response to this interaction.
- DeleteFollowupAsync(ulong)
Deletes a followup message.
- DeleteResponseAsync()
Deletes the interaction response.
- EditFollowupAsync(ulong, DiscordWebhookBuilder, IEnumerable<DiscordAttachment>)
Edits a followup message.
- EditResponseAsync(DiscordWebhookBuilder, IEnumerable<DiscordAttachment>)
Edits the interaction response.
- FollowUpAsync(DiscordFollowupMessageBuilder)
Creates a follow up message to the interaction.
- GetOriginalResponseAsync()
Gets the original interaction response.