Table of Contents

Constructor DiscordApplicationCommand

Namespace
DisCatSharp.Entities
Assembly
DisCatSharp.dll

DiscordApplicationCommand(string, string?, IEnumerable<DiscordApplicationCommandOption>?, ApplicationCommandType, DiscordApplicationCommandLocalization?, DiscordApplicationCommandLocalization?, Permissions?, bool?, bool, List<InteractionContextType>?, List<ApplicationCommandIntegrationTypes>?, ApplicationCommandHandlerType?)

Creates a new instance of a DiscordApplicationCommand.

public DiscordApplicationCommand(string name, string? description, IEnumerable<DiscordApplicationCommandOption>? options = null, ApplicationCommandType type = ApplicationCommandType.ChatInput, DiscordApplicationCommandLocalization? nameLocalizations = null, DiscordApplicationCommandLocalization? descriptionLocalizations = null, Permissions? defaultMemberPermissions = null, bool? dmPermission = null, bool isNsfw = false, List<InteractionContextType>? allowedContexts = null, List<ApplicationCommandIntegrationTypes>? integrationTypes = null, ApplicationCommandHandlerType? handlerType = null)

Parameters

name string

The name of the command.

description string

The description of the command.

options IEnumerable<DiscordApplicationCommandOption>

Optional parameters for this command.

type ApplicationCommandType

The type of the command. Defaults to ChatInput.

nameLocalizations DiscordApplicationCommandLocalization

The localizations of the command name.

descriptionLocalizations DiscordApplicationCommandLocalization

The localizations of the command description.

defaultMemberPermissions Permissions?

The default member permissions.

dmPermission bool?

The dm permission.

isNsfw bool

Whether this command is NSFW.

allowedContexts List<InteractionContextType>

Where the command can be used.

integrationTypes List<ApplicationCommandIntegrationTypes>

The allowed integration types.

handlerType ApplicationCommandHandlerType?

The handler type.