Search Results for

    Show / Hide Table of Contents

    Class ComponentAttribute

    Makes a method available as a component interaction handler.

    Inheritance
    System.Object
    System.Attribute
    ComponentAttribute
    Inherited Members
    System.Attribute.Equals(System.Object)
    System.Attribute.GetCustomAttribute(System.Reflection.Assembly, System.Type)
    System.Attribute.GetCustomAttribute(System.Reflection.Assembly, System.Type, System.Boolean)
    System.Attribute.GetCustomAttribute(System.Reflection.MemberInfo, System.Type)
    System.Attribute.GetCustomAttribute(System.Reflection.MemberInfo, System.Type, System.Boolean)
    System.Attribute.GetCustomAttribute(System.Reflection.Module, System.Type)
    System.Attribute.GetCustomAttribute(System.Reflection.Module, System.Type, System.Boolean)
    System.Attribute.GetCustomAttribute(System.Reflection.ParameterInfo, System.Type)
    System.Attribute.GetCustomAttribute(System.Reflection.ParameterInfo, System.Type, System.Boolean)
    System.Attribute.GetCustomAttributes(System.Reflection.Assembly)
    System.Attribute.GetCustomAttributes(System.Reflection.Assembly, System.Boolean)
    System.Attribute.GetCustomAttributes(System.Reflection.Assembly, System.Type)
    System.Attribute.GetCustomAttributes(System.Reflection.Assembly, System.Type, System.Boolean)
    System.Attribute.GetCustomAttributes(System.Reflection.MemberInfo)
    System.Attribute.GetCustomAttributes(System.Reflection.MemberInfo, System.Boolean)
    System.Attribute.GetCustomAttributes(System.Reflection.MemberInfo, System.Type)
    System.Attribute.GetCustomAttributes(System.Reflection.MemberInfo, System.Type, System.Boolean)
    System.Attribute.GetCustomAttributes(System.Reflection.Module)
    System.Attribute.GetCustomAttributes(System.Reflection.Module, System.Boolean)
    System.Attribute.GetCustomAttributes(System.Reflection.Module, System.Type)
    System.Attribute.GetCustomAttributes(System.Reflection.Module, System.Type, System.Boolean)
    System.Attribute.GetCustomAttributes(System.Reflection.ParameterInfo)
    System.Attribute.GetCustomAttributes(System.Reflection.ParameterInfo, System.Boolean)
    System.Attribute.GetCustomAttributes(System.Reflection.ParameterInfo, System.Type)
    System.Attribute.GetCustomAttributes(System.Reflection.ParameterInfo, System.Type, System.Boolean)
    System.Attribute.GetHashCode()
    System.Attribute.IsDefaultAttribute()
    System.Attribute.IsDefined(System.Reflection.Assembly, System.Type)
    System.Attribute.IsDefined(System.Reflection.Assembly, System.Type, System.Boolean)
    System.Attribute.IsDefined(System.Reflection.MemberInfo, System.Type)
    System.Attribute.IsDefined(System.Reflection.MemberInfo, System.Type, System.Boolean)
    System.Attribute.IsDefined(System.Reflection.Module, System.Type)
    System.Attribute.IsDefined(System.Reflection.Module, System.Type, System.Boolean)
    System.Attribute.IsDefined(System.Reflection.ParameterInfo, System.Type)
    System.Attribute.IsDefined(System.Reflection.ParameterInfo, System.Type, System.Boolean)
    System.Attribute.Match(System.Object)
    System.Attribute.TypeId
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.ToString()
    Namespace: Color_Chan.Discord.Commands.Attributes
    Assembly: Color-Chan.Discord.Commands.dll
    Syntax
    [AttributeUsage(AttributeTargets.Method)]
    public class ComponentAttribute : Attribute

    Constructors

    | Improve this Doc View Source

    ComponentAttribute(String, DiscordComponentType, Boolean, Boolean)

    Initializes a new instance of SlashCommandAttribute.

    Declaration
    public ComponentAttribute(string customId, DiscordComponentType type, bool acknowledge = false, bool editOriginalMessage = false)
    Parameters
    Type Name Description
    System.String customId

    The custom id of the component that the underlying method will handle.

    DiscordComponentType type

    The type of the component that will be handled.

    System.Boolean acknowledge

    Whether or not the component interaction should be automatically acknowledge to prevent the token from turning inactive after 3 seconds.

    System.Boolean editOriginalMessage

    Whether or not the original message of the component should be edited with the returned response. Ignored if acknowledge is set to false.

    Properties

    | Improve this Doc View Source

    Acknowledge

    Whether or not the component interaction should be automatically acknowledge to prevent the token from turning inactive after 3 seconds.

    Declaration
    public bool Acknowledge { get; }
    Property Value
    Type Description
    System.Boolean
    | Improve this Doc View Source

    CustomId

    The developer-defined identifier for the component, max 100 characters

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

    EditOriginalMessage

    Whether or not the original message of the component should be edited with the returned response.

    Declaration
    public bool EditOriginalMessage { get; }
    Property Value
    Type Description
    System.Boolean
    | Improve this Doc View Source

    Type

    The type of the component that will be handled.

    Declaration
    public DiscordComponentType Type { get; }
    Property Value
    Type Description
    DiscordComponentType
    • Improve this Doc
    • View Source
    In This Article
    Back to top Generated by DocFX