Display name support for enum type converter (#2156)
* Display name support for enum type converter * allow display attribute on enum type converter * update docs/examples to include enum Display sample * Revert "allow display attribute on enum type converter" This reverts commit a0eec5b7555d366f9de7421f6fcf6bc71f2a4557. * adds ChoiceDisplay for enum type converters * Update EnumChoiceAttribute.cs * fix renamed folder issue * fix namespace Co-authored-by: Xeno <eliotd@gmail.com>
This commit is contained in:
@@ -1,3 +1,11 @@
|
||||
using Discord.Interactions;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace InteractionFramework
|
||||
{
|
||||
public enum ExampleEnum
|
||||
@@ -5,6 +13,8 @@ namespace InteractionFramework
|
||||
First,
|
||||
Second,
|
||||
Third,
|
||||
Fourth
|
||||
Fourth,
|
||||
[ChoiceDisplay("Twenty First")]
|
||||
TwentyFirst
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user