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