Table of Contents

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

description string

The description of the entry point command. When null, defaults to "Launch an activity".

allowedContexts List<InteractionContextType>

Where the entry point command can be used. When null, Discord's defaults are kept.

integrationTypes List<ApplicationCommandIntegrationTypes>

The allowed integration types. When null, Discord's defaults are kept.

handlerType ApplicationCommandHandlerType?

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

defaultMemberPermissions Permissions?

The default member permissions. When null, no restrictions are applied.

nameLocalizations DiscordApplicationCommandLocalization

The localizations of the command name.

descriptionLocalizations DiscordApplicationCommandLocalization

The localizations of the command description.