Table of Contents

Constructor ContextMenuAttribute

Namespace
DSharpPlus.SlashCommands
Assembly
DSharpPlus.SlashCommands.dll

ContextMenuAttribute(DiscordApplicationCommandType, string, bool, bool)

Marks this method as a context menu.

public ContextMenuAttribute(DiscordApplicationCommandType type, string name, bool defaultPermission = true, bool nsfw = false)

Parameters

type DiscordApplicationCommandType

The type of the context menu.

name string

The name of the context menu.

defaultPermission bool

Sets whether the command should be enabled by default.

nsfw bool

Sets whether the command is age restricted.