mirror of
https://gitlab.com/Kwoth/nadekobot.git
synced 2025-09-11 01:38:27 -04:00
Read about the medusa system [here](https://nadekobot.readthedocs.io/en/latest/medusa/creating-a-medusa/)
37 lines
830 B
C#
37 lines
830 B
C#
namespace Nadeko.Snake;
|
|
|
|
/// <summary>
|
|
/// Marks a method as a snek command
|
|
/// </summary>
|
|
[AttributeUsage(AttributeTargets.Method)]
|
|
public class cmdAttribute : Attribute
|
|
{
|
|
/// <summary>
|
|
/// Command description. Avoid using, as cmds.yml is preferred
|
|
/// </summary>
|
|
public string? desc { get; set; }
|
|
|
|
/// <summary>
|
|
/// Command args examples. Avoid using, as cmds.yml is preferred
|
|
/// </summary>
|
|
public string[]? args { get; set; }
|
|
|
|
/// <summary>
|
|
/// Command aliases
|
|
/// </summary>
|
|
public string[] Aliases { get; }
|
|
|
|
public cmdAttribute()
|
|
{
|
|
desc = null;
|
|
args = null;
|
|
Aliases = Array.Empty<string>();
|
|
}
|
|
|
|
public cmdAttribute(params string[] aliases)
|
|
{
|
|
Aliases = aliases;
|
|
desc = null;
|
|
args = null;
|
|
}
|
|
} |