This repository has been archived on 2024-12-22. You can view files and clone it, but cannot push or open issues or pull requests.
elliebot/src/Ellie.Marmalade/Attributes/cmdAttribute.cs
2024-05-12 23:43:23 +12:00

37 lines
825 B
C#

namespace EllieBot.Marmalade;
/// <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;
}
}