Class SlashCommandParameterAttribute
- Namespace
- NetCord.Services.ApplicationCommands
- Assembly
- NetCord.Services.dll
Specifies metadata for a parameter of a slash command. Use this attribute to configure how a parameter is presented and validated.
[AttributeUsage(AttributeTargets.Parameter)]
public class SlashCommandParameterAttribute : Attribute
- Inheritance
-
SlashCommandParameterAttribute
- Inherited Members
Constructors
SlashCommandParameterAttribute()
public SlashCommandParameterAttribute()
Properties
AllowedChannelTypes
If the option is a channel type, the channels shown will be restricted to these types.
public ChannelType[]? AllowedChannelTypes { get; init; }
Property Value
AutocompleteProviderType
Provider for autocomplete functionality, allowing dynamic suggestions based on user input.
public Type? AutocompleteProviderType { get; init; }
Property Value
ChoicesProviderType
Provider for choices for the parameter, allowing users to select from predefined options.
public Type? ChoicesProviderType { get; init; }
Property Value
Description
Description of the parameter (1-100 characters).
public string? Description { get; init; }
Property Value
MaxLength
Maximum length of the parameter value (1-6000).
public int MaxLength { get; init; }
Property Value
MaxValue
Maximum value permitted for the parameter.
public double MaxValue { get; init; }
Property Value
MinLength
Minimum length of the parameter value (0-6000).
public int MinLength { get; init; }
Property Value
MinValue
Minimum value permitted for the parameter.
public double MinValue { get; init; }
Property Value
Name
Name of the parameter (1-32 characters).
public string? Name { get; init; }
Property Value
TypeReaderType
Type reader for the parameter, used to convert the input value to the specified type.
public Type? TypeReaderType { get; init; }