Class HideAttribute
- Namespace
- Discord.Interactions
- Assembly
- Discord.Net.Interactions.dll
Enum values tagged with this attribute will not be displayed as a parameter choice
[AttributeUsage(AttributeTargets.Field, AllowMultiple = false, Inherited = true)]
public class HideAttribute : Attribute
- Inheritance
-
HideAttribute
- Inherited Members
Remarks
This attribute must be used along with the default Discord.Interactions.EnumConverter<T> and Discord.Interactions.DefaultEntityTypeConverter<T>.
Methods
Predicate(IDiscordInteraction)
Can be optionally implemented by inherited types to conditionally hide an enum value.
public virtual bool Predicate(IDiscordInteraction interaction)
Parameters
interactionIDiscordInteractionInteraction that RespondWithModalAsync<T>(IDiscordInteraction, string, T, RequestOptions, Action<ModalBuilder>) is called on.
Returns
Remarks
Only runs on prior to modal construction. For slash command parameters, this method is ignored.