Interface IInteractionContext
The context for an interaction command.
Namespace: Color_Chan.Discord.Commands.Models.Contexts
Assembly: Color-Chan.Discord.Commands.dll
Syntax
public interface IInteractionContext
Properties
| Improve this Doc View SourceApplicationId
Id of the application this interaction is for.
Declaration
ulong ApplicationId { get; set; }
Property Value
Type | Description |
---|---|
System.UInt64 |
Channel
The channel interaction was used in.
Declaration
IDiscordChannel Channel { get; set; }
Property Value
Type | Description |
---|---|
IDiscordChannel |
Remarks
Always null when EnableAutoGetGuild is disabled.
ChannelId
The Channel id of the current Channel.
Declaration
ulong ChannelId { get; set; }
Property Value
Type | Description |
---|---|
System.UInt64 |
Remarks
This will be the user the id when the interaction was used in DMs.
Data
The interaction command that the user has requested. Including the request data.
Declaration
IDiscordInteractionRequest Data { get; set; }
Property Value
Type | Description |
---|---|
IDiscordInteractionRequest |
Entitlements
The entitlements attached to the interaction.
Declaration
IEnumerable<IDiscordEntitlement> Entitlements { get; set; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<IDiscordEntitlement> |
Guild
The guild the interaction was used in.
Declaration
IDiscordGuild Guild { get; set; }
Property Value
Type | Description |
---|---|
IDiscordGuild |
Remarks
Always null when EnableAutoGetGuild is disabled.
GuildId
The Guild id of the current guild.
Declaration
ulong? GuildId { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<System.UInt64> |
Remarks
Null when the interaction was used in DMs.
InteractionId
The interaction id.
Declaration
ulong InteractionId { get; set; }
Property Value
Type | Description |
---|---|
System.UInt64 |
Member
The guild user that has made the interaction request.
Declaration
IDiscordGuildMember Member { get; set; }
Property Value
Type | Description |
---|---|
IDiscordGuildMember |
Remarks
Null when the interaction was used in DMs.
Message
The message of the interaction request.
Declaration
IDiscordMessage Message { get; set; }
Property Value
Type | Description |
---|---|
IDiscordMessage |
MethodName
The method name of the method that will handle the interaction request.
Declaration
string MethodName { get; set; }
Property Value
Type | Description |
---|---|
String |
Remarks
Used to create a unique string for rate limiting.
Permissions
Permissions the app or bot has within the channel the interaction was sent from.
Declaration
DiscordPermission? Permissions { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<DiscordPermission> |
Token
The token of the interaction.
Declaration
string Token { get; set; }
Property Value
Type | Description |
---|---|
String |
User
The user that has made the interaction request.
Declaration
IDiscordUser User { get; set; }
Property Value
Type | Description |
---|---|
IDiscordUser |