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
Properties
Description
获取斜线命令的描述。
public string? Description { get; }
Property Value
Name
获取斜线命令的名称。
public string Name { get; }
Property Value
RunMode
获取此命令执行时的运行模式。
public RunMode RunMode { get; }