Method RegisterEntryPointCommand
- Namespace
- DisCatSharp.ApplicationCommands
- Assembly
- DisCatSharp.ApplicationCommands.dll
RegisterEntryPointCommand(string?, List<InteractionContextType>?, List<ApplicationCommandIntegrationTypes>?, ApplicationCommandHandlerType?, Permissions?, DiscordApplicationCommandLocalization?, DiscordApplicationCommandLocalization?)
Registers a custom entry point command for the application's activity.
Only one entry point command can exist per application. The name is always "launch" as required by Discord.
Use this to configure the description, allowed contexts, integration types, and handler type of the entry point command.
public void RegisterEntryPointCommand(string? description = null, List<InteractionContextType>? allowedContexts = null, List<ApplicationCommandIntegrationTypes>? integrationTypes = null, ApplicationCommandHandlerType? handlerType = null, Permissions? defaultMemberPermissions = null, DiscordApplicationCommandLocalization? nameLocalizations = null, DiscordApplicationCommandLocalization? descriptionLocalizations = null)
Parameters
descriptionstringThe description of the entry point command. When null, defaults to "Launch an activity".
allowedContextsList<InteractionContextType>Where the entry point command can be used. When null, Discord's defaults are kept.
integrationTypesList<ApplicationCommandIntegrationTypes>The allowed integration types. When null, Discord's defaults are kept.
handlerTypeApplicationCommandHandlerType?The handler type. When null, falls back to ActivityHandlerType.
defaultMemberPermissionsPermissions?The default member permissions. When null, no restrictions are applied.
nameLocalizationsDiscordApplicationCommandLocalizationThe localizations of the command name.
descriptionLocalizationsDiscordApplicationCommandLocalizationThe localizations of the command description.