Class ComponentAttribute
Makes a method available as a component interaction handler.
Inherited Members
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 SourceComponentAttribute(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 |
---|---|---|
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. |
Boolean | acknowledge | Whether or not the component interaction should be automatically acknowledge to prevent the token from turning inactive after 3 seconds. |
Boolean | editOriginalMessage | Whether or not the original message of the component should be edited with the returned response. Ignored if
|
Properties
| Improve this Doc View SourceAcknowledge
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 |
---|---|
Boolean |
CustomId
The developer-defined identifier for the component, max 100 characters
Declaration
public string CustomId { get; }
Property Value
Type | Description |
---|---|
String |
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 |
---|---|
Boolean |
Type
The type of the component that will be handled.
Declaration
public DiscordComponentType Type { get; }
Property Value
Type | Description |
---|---|
DiscordComponentType |