Table of Contents

Class SlashCommandAttribute

Namespace
HeyBox.Interactions
Assembly
HeyBox.Net.Interactions.dll

创建一个斜线应用命令。

[AttributeUsage(AttributeTargets.Method, AllowMultiple = false)]
public class SlashCommandAttribute : Attribute
Inheritance
SlashCommandAttribute
Inherited Members

Constructors

SlashCommandAttribute(string, string?, RunMode)

注册一个方法为斜线命令。

public SlashCommandAttribute(string name, string? description = null, RunMode runMode = RunMode.Default)

Parameters

name string

命令名称。

description string

命令描述。

runMode RunMode

设置命令的运行模式。

Properties

Description

获取斜线命令的描述。

public string? Description { get; }

Property Value

string

Name

获取斜线命令的名称。

public string Name { get; }

Property Value

string

RunMode

获取此命令执行时的运行模式。

public RunMode RunMode { get; }

Property Value

RunMode