mirror of
https://gitlab.com/Kwoth/nadekobot.git
synced 2025-09-10 01:08:26 -04:00
20 lines
559 B
C#
20 lines
559 B
C#
using System;
|
|
using System.Runtime.CompilerServices;
|
|
using Discord.Commands;
|
|
using NadekoBot.Core.Services.Impl;
|
|
|
|
namespace NadekoBot.Common.Attributes
|
|
{
|
|
[AttributeUsage(AttributeTargets.Method)]
|
|
public sealed class NadekoCommandAttribute : CommandAttribute
|
|
{
|
|
public NadekoCommandAttribute([CallerMemberName] string memberName="")
|
|
: base(CommandNameLoadHelper.GetCommandNameFor(memberName))
|
|
{
|
|
this.MethodName = memberName.ToLowerInvariant();
|
|
}
|
|
|
|
public string MethodName { get; }
|
|
}
|
|
}
|