Class ApplicationCommandOptions
public class ApplicationCommandOptions
- Inheritance
-
ApplicationCommandOptions
- Inherited Members
Properties
Contexts
Interaction context(s) where the command can be used.
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyName("contexts")]
public IEnumerable<InteractionContextType>? Contexts { get; set; }
Property Value
DefaultGuildPermissions
Default required permissions to use the command.
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyName("default_member_permissions")]
public Permissions? DefaultGuildPermissions { get; set; }
Property Value
Description
Description of the command (1-100 characters).
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyName("description")]
public string? Description { get; set; }
Property Value
DescriptionLocalizations
Localizations of Description (1-100 characters each).
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyName("description_localizations")]
public IReadOnlyDictionary<string, string>? DescriptionLocalizations { get; set; }
Property Value
IntegrationTypes
Installation context(s) where the command is available.
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyName("integration_types")]
public IEnumerable<ApplicationIntegrationType>? IntegrationTypes { get; set; }
Property Value
Name
Name of the command (1-32 characters).
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyName("name")]
public string? Name { get; set; }
Property Value
NameLocalizations
Localizations of Name (1-32 characters each).
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyName("name_localizations")]
public IReadOnlyDictionary<string, string>? NameLocalizations { get; set; }
Property Value
Nsfw
Indicates whether the command is age-restricted.
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyName("nsfw")]
public bool? Nsfw { get; set; }
Property Value
- bool?
Options
Parameters for the command (max 25).
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyName("options")]
public IEnumerable<ApplicationCommandOptionProperties>? Options { get; set; }
Property Value
Methods
AddContexts(params IEnumerable<InteractionContextType>)
Interaction context(s) where the command can be used.
public ApplicationCommandOptions AddContexts(params IEnumerable<InteractionContextType> contexts)
Parameters
contexts
IEnumerable<InteractionContextType>
Returns
AddIntegrationTypes(params IEnumerable<ApplicationIntegrationType>)
Installation context(s) where the command is available.
public ApplicationCommandOptions AddIntegrationTypes(params IEnumerable<ApplicationIntegrationType> integrationTypes)
Parameters
integrationTypes
IEnumerable<ApplicationIntegrationType>
Returns
AddOptions(params IEnumerable<ApplicationCommandOptionProperties>)
Parameters for the command (max 25).
public ApplicationCommandOptions AddOptions(params IEnumerable<ApplicationCommandOptionProperties> options)
Parameters
Returns
WithContexts(IEnumerable<InteractionContextType>?)
Interaction context(s) where the command can be used.
public ApplicationCommandOptions WithContexts(IEnumerable<InteractionContextType>? contexts)
Parameters
contexts
IEnumerable<InteractionContextType>
Returns
WithDefaultGuildPermissions(Permissions?)
Default required permissions to use the command.
public ApplicationCommandOptions WithDefaultGuildPermissions(Permissions? defaultGuildPermissions)
Parameters
defaultGuildPermissions
Permissions?
Returns
WithDescription(string?)
Description of the command (1-100 characters).
public ApplicationCommandOptions WithDescription(string? description)
Parameters
description
string
Returns
WithDescriptionLocalizations(IReadOnlyDictionary<string, string>?)
Localizations of Description (1-100 characters each).
public ApplicationCommandOptions WithDescriptionLocalizations(IReadOnlyDictionary<string, string>? descriptionLocalizations)
Parameters
descriptionLocalizations
IReadOnlyDictionary<string, string>
Returns
WithIntegrationTypes(IEnumerable<ApplicationIntegrationType>?)
Installation context(s) where the command is available.
public ApplicationCommandOptions WithIntegrationTypes(IEnumerable<ApplicationIntegrationType>? integrationTypes)
Parameters
integrationTypes
IEnumerable<ApplicationIntegrationType>
Returns
WithName(string?)
Name of the command (1-32 characters).
public ApplicationCommandOptions WithName(string? name)
Parameters
name
string
Returns
WithNameLocalizations(IReadOnlyDictionary<string, string>?)
Localizations of Name (1-32 characters each).
public ApplicationCommandOptions WithNameLocalizations(IReadOnlyDictionary<string, string>? nameLocalizations)
Parameters
nameLocalizations
IReadOnlyDictionary<string, string>
Returns
WithNsfw(bool?)
Indicates whether the command is age-restricted.
public ApplicationCommandOptions WithNsfw(bool? nsfw = true)
Parameters
nsfw
bool?
Returns
WithOptions(IEnumerable<ApplicationCommandOptionProperties>?)
Parameters for the command (max 25).
public ApplicationCommandOptions WithOptions(IEnumerable<ApplicationCommandOptionProperties>? options)