Table of Contents

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

extensions IReadOnlyDictionary<int, ApplicationCommandsExtension>

Sharding extensions.

description string

The description of the entry point command.

allowedContexts List<InteractionContextType>

Where the entry point command can be used.

integrationTypes List<ApplicationCommandIntegrationTypes>

The allowed integration types.

handlerType ApplicationCommandHandlerType?

The handler type. When null, falls back to ActivityHandlerType.

defaultMemberPermissions Permissions?

The default member permissions.

nameLocalizations DiscordApplicationCommandLocalization

The localizations of the command name.

descriptionLocalizations DiscordApplicationCommandLocalization

The localizations of the command description.