Interface IDiscordInteraction
An interaction is the base "thing" that is sent when a user invokes a command, and is the same for Slash Commands and other future interaction types (such as Message Components). Represents a discord Interaction Structure API model. Docs: https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-structure
Namespace: Color_Chan.Discord.Core.Common.Models.Interaction
Assembly: Color-Chan.Discord.Core.dll
Syntax
public interface IDiscordInteraction
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 |
ChannelId
The channel it was sent from.
Declaration
ulong? ChannelId { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<System.UInt64> |
Data
The command data payload.
Declaration
IDiscordInteractionRequest Data { get; set; }
Property Value
Type | Description |
---|---|
IDiscordInteractionRequest |
Remarks
This is always present on application command interaction types. It is optional for future-proofing against new interaction types.
Entitlements
The entitlements attached to the interaction.
Declaration
IEnumerable<IDiscordEntitlement> Entitlements { get; set; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<IDiscordEntitlement> |
EntitlementSkuIds
The ids of the entitlements SKUs attached to the interaction.
Declaration
IEnumerable<ulong> EntitlementSkuIds { get; set; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<System.UInt64> |
GuildId
The guild it was sent from.
Declaration
ulong? GuildId { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<System.UInt64> |
GuildMember
Guild member data for the invoking user, including permissions.
Declaration
IDiscordGuildMember GuildMember { get; set; }
Property Value
Type | Description |
---|---|
IDiscordGuildMember |
Id
The Discord provided snowflake id.
Declaration
ulong Id { get; set; }
Property Value
Type | Description |
---|---|
System.UInt64 |
Message
For components, the message they were attached to.
Declaration
IDiscordMessage Message { get; set; }
Property Value
Type | Description |
---|---|
IDiscordMessage |
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> |
RequestType
The type of interaction.
Declaration
DiscordInteractionRequestType RequestType { get; set; }
Property Value
Type | Description |
---|---|
DiscordInteractionRequestType |
Token
A continuation token for responding to the interaction.
Declaration
string Token { get; set; }
Property Value
Type | Description |
---|---|
String |
User
User object for the invoking user, if invoked in a DM.
Declaration
IDiscordUser User { get; set; }
Property Value
Type | Description |
---|---|
IDiscordUser |
Versions
Read-only property, always 1
Declaration
int Versions { get; set; }
Property Value
Type | Description |
---|---|
Int32 |
Methods
| Improve this Doc View SourceIsPingInteraction()
Checks whether or not the interaction RequestType is Ping.
Declaration
bool IsPingInteraction()
Returns
Type | Description |
---|---|
Boolean | True or false depending on the value of RequestType. |