Search Results for

    Show / Hide Table of Contents

    Class InteractionContext

    The context for an interaction command.

    Inheritance
    System.Object
    InteractionContext
    ComponentContext
    SlashCommandContext
    Implements
    IInteractionContext
    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.Commands.Models.Contexts
    Assembly: Color-Chan.Discord.Commands.dll
    Syntax
    public class InteractionContext : IInteractionContext

    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

    Channel

    The channel interaction was used in.

    Declaration
    public IDiscordChannel Channel { get; set; }
    Property Value
    Type Description
    IDiscordChannel
    Remarks

    Always null when EnableAutoGetGuild is disabled.

    | Improve this Doc View Source

    ChannelId

    The Channel id of the current Channel.

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

    | Improve this Doc View Source

    Data

    The interaction command that the user has requested. Including the request data.

    Declaration
    public IDiscordInteractionRequest Data { get; set; }
    Property Value
    Type Description
    IDiscordInteractionRequest
    | 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

    Guild

    The guild the interaction was used in.

    Declaration
    public IDiscordGuild Guild { get; set; }
    Property Value
    Type Description
    IDiscordGuild
    Remarks

    Always null when EnableAutoGetGuild is disabled.

    | Improve this Doc View Source

    GuildId

    The Guild id of the current guild.

    Declaration
    public ulong? GuildId { get; set; }
    Property Value
    Type Description
    System.Nullable<System.UInt64>
    Remarks

    Null when the interaction was used in DMs.

    | Improve this Doc View Source

    InteractionId

    The interaction id.

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

    Member

    The guild user that has made the interaction request.

    Declaration
    public IDiscordGuildMember Member { get; set; }
    Property Value
    Type Description
    IDiscordGuildMember
    Remarks

    Null when the interaction was used in DMs.

    | Improve this Doc View Source

    Message

    The message of the interaction request.

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

    MethodName

    The method name of the method that will handle the interaction request.

    Declaration
    public string MethodName { get; set; }
    Property Value
    Type Description
    System.String
    Remarks

    Used to create a unique string for rate limiting.

    | 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

    Token

    The token of the interaction.

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

    User

    The user that has made the interaction request.

    Declaration
    public IDiscordUser User { get; set; }
    Property Value
    Type Description
    IDiscordUser

    Implements

    IInteractionContext

    Extension Methods

    InteractionContextExtensions.HasActiveEntitlement(IInteractionContext, UInt64)
    • Improve this Doc
    • View Source
    In This Article
    Back to top Generated by DocFX