Search Results for

    Show / Hide Table of Contents

    Class DiscordInteraction

    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

    Inheritance
    System.Object
    DiscordInteraction
    Implements
    IDiscordInteraction
    System.IEquatable<DiscordInteraction>
    Inherited Members
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.ToString()
    Namespace: Color_Chan.Discord.Rest.Models.Interaction
    Assembly: Color-Chan.Discord.Rest.dll
    Syntax
    public class DiscordInteraction : IDiscordInteraction, IEquatable<DiscordInteraction>

    Constructors

    | Improve this Doc View Source

    DiscordInteraction(DiscordInteractionData)

    Initializes a new DiscordInteraction

    Declaration
    public DiscordInteraction(DiscordInteractionData data)
    Parameters
    Type Name Description
    DiscordInteractionData data

    The data needed to create the DiscordInteraction.

    Properties

    | Improve this Doc View Source

    ApplicationId

    Id of the application this interaction is for.

    Declaration
    public ulong ApplicationId { get; set; }
    Property Value
    Type Description
    System.UInt64
    | Improve this Doc View Source

    ChannelId

    The channel it was sent from.

    Declaration
    public ulong? ChannelId { get; set; }
    Property Value
    Type Description
    System.Nullable<System.UInt64>
    | Improve this Doc View Source

    Data

    The command data payload.

    Declaration
    public 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.

    | Improve this Doc View Source

    Entitlements

    The entitlements attached to the interaction.

    Declaration
    public IEnumerable<IDiscordEntitlement> Entitlements { get; set; }
    Property Value
    Type Description
    System.Collections.Generic.IEnumerable<IDiscordEntitlement>
    | Improve this Doc View Source

    EntitlementSkuIds

    The ids of the entitlements SKUs attached to the interaction.

    Declaration
    public IEnumerable<ulong> EntitlementSkuIds { get; set; }
    Property Value
    Type Description
    System.Collections.Generic.IEnumerable<System.UInt64>
    | Improve this Doc View Source

    GuildId

    The guild it was sent from.

    Declaration
    public ulong? GuildId { get; set; }
    Property Value
    Type Description
    System.Nullable<System.UInt64>
    | Improve this Doc View Source

    GuildMember

    Guild member data for the invoking user, including permissions.

    Declaration
    public IDiscordGuildMember GuildMember { get; set; }
    Property Value
    Type Description
    IDiscordGuildMember
    | Improve this Doc View Source

    Id

    The Discord provided snowflake id.

    Declaration
    public ulong Id { get; set; }
    Property Value
    Type Description
    System.UInt64
    | Improve this Doc View Source

    Message

    For components, the message they were attached to.

    Declaration
    public IDiscordMessage Message { get; set; }
    Property Value
    Type Description
    IDiscordMessage
    | Improve this Doc View Source

    Permissions

    Permissions the app or bot has within the channel the interaction was sent from.

    Declaration
    public DiscordPermission? Permissions { get; set; }
    Property Value
    Type Description
    System.Nullable<DiscordPermission>
    | Improve this Doc View Source

    RequestType

    The type of interaction.

    Declaration
    public DiscordInteractionRequestType RequestType { get; set; }
    Property Value
    Type Description
    DiscordInteractionRequestType
    | Improve this Doc View Source

    Token

    A continuation token for responding to the interaction.

    Declaration
    public string Token { get; set; }
    Property Value
    Type Description
    System.String
    | Improve this Doc View Source

    User

    User object for the invoking user, if invoked in a DM.

    Declaration
    public IDiscordUser User { get; set; }
    Property Value
    Type Description
    IDiscordUser
    | Improve this Doc View Source

    Versions

    Read-only property, always 1

    Declaration
    public int Versions { get; set; }
    Property Value
    Type Description
    System.Int32

    Methods

    | Improve this Doc View Source

    IsPingInteraction()

    Checks whether or not the interaction RequestType is Ping.

    Declaration
    public bool IsPingInteraction()
    Returns
    Type Description
    System.Boolean

    True or false depending on the value of RequestType.

    Implements

    IDiscordInteraction
    System.IEquatable<T>
    • Improve this Doc
    • View Source
    In This Article
    Back to top Generated by DocFX