Table of Contents

Class EnumOptionAttribute

Namespace
Discord.Interactions
Assembly
Discord.Net.Interactions.dll

Adds additional metadata to enum fields that are used for select-menus, checkbox groups, and radio groups.

[AttributeUsage(AttributeTargets.Field, AllowMultiple = false)]
public class EnumOptionAttribute : Attribute
Inheritance
EnumOptionAttribute
Inherited Members

Remarks

To manually add select menu, checkbox group or radio group options to modal components, instead use ModalSelectMenuOptionAttribute, ModalCheckboxGroupOptionAttribute, and ModalRadioGroupOptionAttribute respectively.

Properties

Description

Gets or sets the desription of the option.

public string Description { get; set; }

Property Value

string

Emote

Gets or sets the emote of the option.

public string Emote { get; set; }

Property Value

string

Remarks

Can be either an Emoji or an Emote.
Only applicable for select menus.

IsDefault

Gets or sets whether the option is selected by default.

public bool IsDefault { get; set; }

Property Value

bool