mirror of
https://gitlab.com/Kwoth/nadekobot.git
synced 2025-09-10 09:18:27 -04:00
18 lines
580 B
C#
18 lines
580 B
C#
using System.Runtime.CompilerServices;
|
|
|
|
namespace NadekoBot.Common.Attributes;
|
|
|
|
[AttributeUsage(AttributeTargets.Method)]
|
|
public sealed class CmdAttribute : CommandAttribute
|
|
{
|
|
public string MethodName { get; }
|
|
|
|
public CmdAttribute([CallerMemberName] string memberName = "")
|
|
: base(CommandNameLoadHelper.GetCommandNameFor(memberName))
|
|
{
|
|
MethodName = memberName.ToLowerInvariant();
|
|
Aliases = CommandNameLoadHelper.GetAliasesFor(memberName);
|
|
Remarks = memberName.ToLowerInvariant();
|
|
Summary = memberName.ToLowerInvariant();
|
|
}
|
|
} |