Table of Contents

Constructor SlashCommandAttribute

Namespace
DisCatSharp.ApplicationCommands.Attributes
Assembly
DisCatSharp.ApplicationCommands.dll

SlashCommandAttribute(string, string, bool, InteractionContextType[]?, ApplicationCommandIntegrationTypes[]?)

Marks this method as a slash command.

public SlashCommandAttribute(string name, string description, bool isNsfw = false, InteractionContextType[]? allowedContexts = null, ApplicationCommandIntegrationTypes[]? integrationTypes = null)

Parameters

name string

The name of this slash command.

description string

The description of this slash command.

isNsfw bool

Whether this command is marked as NSFW.

allowedContexts InteractionContextType[]

The allowed contexts of this slash command.

integrationTypes ApplicationCommandIntegrationTypes[]

The allowed integration types.

SlashCommandAttribute(string, string, long, bool, InteractionContextType[]?, ApplicationCommandIntegrationTypes[]?)

Marks this method as a slash command.

public SlashCommandAttribute(string name, string description, long defaultMemberPermissions, bool isNsfw = false, InteractionContextType[]? allowedContexts = null, ApplicationCommandIntegrationTypes[]? integrationTypes = null)

Parameters

name string

The name of this slash command.

description string

The description of this slash command.

defaultMemberPermissions long

The default member permissions.

isNsfw bool

Whether this command is marked as NSFW.

allowedContexts InteractionContextType[]

The allowed contexts of this slash command.

integrationTypes ApplicationCommandIntegrationTypes[]

The allowed integration types.

SlashCommandAttribute(string, string, bool, bool, InteractionContextType[]?, ApplicationCommandIntegrationTypes[]?)

Marks this method as a slash command.

public SlashCommandAttribute(string name, string description, bool dmPermission, bool isNsfw = false, InteractionContextType[]? allowedContexts = null, ApplicationCommandIntegrationTypes[]? integrationTypes = null)

Parameters

name string

The name of this slash command.

description string

The description of this slash command.

dmPermission bool

The dm permission.

isNsfw bool

Whether this command is marked as NSFW.

allowedContexts InteractionContextType[]

The allowed contexts of this slash command.

integrationTypes ApplicationCommandIntegrationTypes[]

The allowed integration types.

SlashCommandAttribute(string, string, long, bool, bool, InteractionContextType[]?, ApplicationCommandIntegrationTypes[]?)

Marks this method as a slash command.

public SlashCommandAttribute(string name, string description, long defaultMemberPermissions, bool dmPermission, bool isNsfw = false, InteractionContextType[]? allowedContexts = null, ApplicationCommandIntegrationTypes[]? integrationTypes = null)

Parameters

name string

The name of this slash command.

description string

The description of this slash command.

defaultMemberPermissions long

The default member permissions.

dmPermission bool

The dm permission.

isNsfw bool

Whether this command is marked as NSFW.

allowedContexts InteractionContextType[]

The allowed contexts of this slash command.

integrationTypes ApplicationCommandIntegrationTypes[]

The allowed integration types.