Class ApplicationCommandBuilder
- Namespace
- NetCord.Services.ApplicationCommands
- Assembly
- NetCord.Services.dll
Application commands are native ways to interact with apps in the Discord client.
public abstract class ApplicationCommandBuilder
- Inheritance
-
ApplicationCommandBuilder
- Derived
- Inherited Members
Properties
Contexts
Interaction context(s) where the command can be used.
public IEnumerable<InteractionContextType>? Contexts { get; set; }
Property Value
DefaultGuildPermissions
Default required permissions to use the command.
public Permissions? DefaultGuildPermissions { get; set; }
Property Value
IntegrationTypes
Installation context(s) where the command is available.
public IEnumerable<ApplicationIntegrationType>? IntegrationTypes { get; set; }
Property Value
Name
Name of the command (1-32 characters).
public string Name { get; }
Property Value
Nsfw
Indicates whether the command is age-restricted.
public bool Nsfw { get; set; }
Property Value
Register
Whether the application command should be registered by the service.
public bool Register { get; set; }
Property Value
Methods
AddContexts(params IEnumerable<InteractionContextType>)
Interaction context(s) where the command can be used.
public ApplicationCommandBuilder AddContexts(params IEnumerable<InteractionContextType> contexts)
Parameters
contextsIEnumerable<InteractionContextType>
Returns
AddIntegrationTypes(params IEnumerable<ApplicationIntegrationType>)
Installation context(s) where the command is available.
public ApplicationCommandBuilder AddIntegrationTypes(params IEnumerable<ApplicationIntegrationType> integrationTypes)
Parameters
integrationTypesIEnumerable<ApplicationIntegrationType>
Returns
WithContexts(IEnumerable<InteractionContextType>?)
Interaction context(s) where the command can be used.
public ApplicationCommandBuilder WithContexts(IEnumerable<InteractionContextType>? contexts)
Parameters
contextsIEnumerable<InteractionContextType>
Returns
WithDefaultGuildPermissions(Permissions?)
Default required permissions to use the command.
public ApplicationCommandBuilder WithDefaultGuildPermissions(Permissions? defaultGuildPermissions)
Parameters
defaultGuildPermissionsPermissions?
Returns
WithIntegrationTypes(IEnumerable<ApplicationIntegrationType>?)
Installation context(s) where the command is available.
public ApplicationCommandBuilder WithIntegrationTypes(IEnumerable<ApplicationIntegrationType>? integrationTypes)
Parameters
integrationTypesIEnumerable<ApplicationIntegrationType>
Returns
WithNsfw(bool)
Indicates whether the command is age-restricted.
public ApplicationCommandBuilder WithNsfw(bool nsfw = true)
Parameters
nsfwbool
Returns
WithRegister(bool)
Whether the application command should be registered by the service.
public ApplicationCommandBuilder WithRegister(bool register = true)
Parameters
registerbool