Table of Contents

Class BaseContext

Namespace
DisCatSharp.ApplicationCommands.Context
Assembly
DisCatSharp.ApplicationCommands.dll

Represents a base context for application command contexts.

public class BaseContext : DisCatSharpCommandContext
Inheritance
BaseContext
Derived
Inherited Members

Properties

AppPermissions

Gets the applications permissions.

ApplicationCommandsExtension

Gets the application command module this interaction was created in.

Channel

Gets the channel this interaction was executed in.

EntitlementSkuIds

Gets the entitlement sku ids.

This is related to premium subscriptions for bots.

warning

Can only be used if you have an associated application subscription sku.

Entitlements

Gets the entitlements.

This is related to premium subscriptions for bots.

warning

Can only be used if you have an associated application subscription sku.

FullCommandName

Gets the full command string, including the subcommand.

Guild

Gets the guild this interaction was executed in.

GuildLocale

Gets the guild locale if applicable.

Interaction

Gets the interaction that was created.

InteractionId

Gets the id for this interaction.

Locale

Gets the invoking user locale.

Member

Gets the member which executed this interaction, or null if the command is in a DM.

Services

Gets the service provider.

This allows passing data around without resorting to static members.

Defaults to an empty service provider.

Token

Gets the token for this interaction.

Type

Gets the type of this interaction.

User

Gets the user which executed this interaction.

Methods

CreateInteractionIframeResponseAsync(string, string, IframeModalSize, string?)

Creates an iframe response to this interaction.

CreateModalResponseAsync(DiscordInteractionModalBuilder)

Creates a modal response to this interaction.

CreateResponseAsync(InteractionResponseType, 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, create a DeferredChannelMessageWithSource at the start, and edit the response later.

DeleteFollowupAsync(ulong)

Deletes a followup message.

DeleteResponseAsync()

Deletes the interaction response.

EditFollowupAsync(ulong, DiscordWebhookBuilder)

Edits a followup message.

EditFollowupAsync(ulong, string)

Edits a followup message.

EditResponseAsync(DiscordWebhookBuilder)

Edits the interaction response.

FollowUpAsync(DiscordFollowupMessageBuilder)

Creates a follow up message to the interaction.

FollowUpAsync(string)

Creates a follow up message to the interaction.

GetFollowupMessageAsync(ulong)

Gets the followup message.

GetOriginalResponseAsync()

Gets the original interaction response.