Table of Contents

Class DiscordSlashCommand

Namespace
BotManager.Discord.Models
Assembly
BotManager.Discord.dll

Defines the action for a Discord slash command. A slash command can be global or set to a specific guild.

public sealed class DiscordSlashCommand
Inheritance
DiscordSlashCommand
Inherited Members

Constructors

DiscordSlashCommand()

public DiscordSlashCommand()

Properties

Action

Gets and sets the expression to run once a user executes this slash command.

public IExpression? Action { get; set; }

Property Value

IExpression

Description

Gets and sets the commands description.

public string? Description { get; set; }

Property Value

string

Guild

Gets and sets the guild for this command. If no guild is defined, it will be registered as global command.

public DiscordIdentifier? Guild { get; set; }

Property Value

DiscordIdentifier?

Name

Gets and sets the command name (without the leading slash).

public string? Name { get; set; }

Property Value

string

Options

Gets and sets the list of parameter for this command.

public DiscordSlashCommandOption[]? Options { get; set; }

Property Value

DiscordSlashCommandOption[]