Method RegisterEntryPointCommand
- Namespace
- DisCatSharp.ApplicationCommands
- Assembly
- DisCatSharp.ApplicationCommands.dll
RegisterEntryPointCommand(IReadOnlyDictionary<int, ApplicationCommandsExtension>, string?, List<InteractionContextType>?, List<ApplicationCommandIntegrationTypes>?, ApplicationCommandHandlerType?, Permissions?, DiscordApplicationCommandLocalization?, DiscordApplicationCommandLocalization?)
Registers an entry point command across all shards.
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 static void RegisterEntryPointCommand(this IReadOnlyDictionary<int, ApplicationCommandsExtension> extensions, string? description = null, List<InteractionContextType>? allowedContexts = null, List<ApplicationCommandIntegrationTypes>? integrationTypes = null, ApplicationCommandHandlerType? handlerType = null, Permissions? defaultMemberPermissions = null, DiscordApplicationCommandLocalization? nameLocalizations = null, DiscordApplicationCommandLocalization? descriptionLocalizations = null)
Parameters
extensionsIReadOnlyDictionary<int, ApplicationCommandsExtension>Sharding extensions.
descriptionstringThe description of the entry point command.
allowedContextsList<InteractionContextType>Where the entry point command can be used.
integrationTypesList<ApplicationCommandIntegrationTypes>The allowed integration types.
handlerTypeApplicationCommandHandlerType?The handler type. When null, falls back to ActivityHandlerType.
defaultMemberPermissionsPermissions?The default member permissions.
nameLocalizationsDiscordApplicationCommandLocalizationThe localizations of the command name.
descriptionLocalizationsDiscordApplicationCommandLocalizationThe localizations of the command description.