mirror of
https://gitlab.com/Kwoth/nadekobot.git
synced 2025-09-10 17:28:27 -04:00
Removed cmd source generator. Commands are no longer partial methods. Compilations should be slightly faster now. Updated packages and adapted drawing code to the new apis. There may be some bugs.
This commit is contained in:
@@ -3,11 +3,16 @@ using System.Runtime.CompilerServices;
|
||||
namespace NadekoBot.Common.Attributes;
|
||||
|
||||
[AttributeUsage(AttributeTargets.Method)]
|
||||
public sealed class NadekoCommandAttribute : CommandAttribute
|
||||
public sealed class CmdAttribute : CommandAttribute
|
||||
{
|
||||
public string MethodName { get; }
|
||||
|
||||
public NadekoCommandAttribute([CallerMemberName] string memberName = "")
|
||||
public CmdAttribute([CallerMemberName] string memberName = "")
|
||||
: base(CommandNameLoadHelper.GetCommandNameFor(memberName))
|
||||
=> MethodName = memberName.ToLowerInvariant();
|
||||
{
|
||||
MethodName = memberName.ToLowerInvariant();
|
||||
Aliases = CommandNameLoadHelper.GetAliasesFor(memberName);
|
||||
Remarks = memberName.ToLowerInvariant();
|
||||
// Summary = memberName.ToLowerInvariant();
|
||||
}
|
||||
}
|
@@ -1,30 +1,32 @@
|
||||
using System.Runtime.CompilerServices;
|
||||
// using System.Runtime.CompilerServices;
|
||||
//
|
||||
// namespace NadekoBot.Common.Attributes;
|
||||
//
|
||||
// [AttributeUsage(AttributeTargets.Class)]
|
||||
// internal sealed class NadekoModuleAttribute : GroupAttribute
|
||||
// {
|
||||
// public NadekoModuleAttribute(string moduleName)
|
||||
// : base(moduleName)
|
||||
// {
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// [AttributeUsage(AttributeTargets.Method)]
|
||||
// internal sealed class NadekoDescriptionAttribute : SummaryAttribute
|
||||
// {
|
||||
// public NadekoDescriptionAttribute([CallerMemberName] string name = "")
|
||||
// : base(name.ToLowerInvariant())
|
||||
// {
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// [AttributeUsage(AttributeTargets.Method)]
|
||||
// internal sealed class NadekoUsageAttribute : RemarksAttribute
|
||||
// {
|
||||
// public NadekoUsageAttribute([CallerMemberName] string name = "")
|
||||
// : base(name.ToLowerInvariant())
|
||||
// {
|
||||
// }
|
||||
// }
|
||||
|
||||
namespace NadekoBot.Common.Attributes;
|
||||
|
||||
[AttributeUsage(AttributeTargets.Class)]
|
||||
internal sealed class NadekoModuleAttribute : GroupAttribute
|
||||
{
|
||||
public NadekoModuleAttribute(string moduleName)
|
||||
: base(moduleName)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
[AttributeUsage(AttributeTargets.Method)]
|
||||
internal sealed class NadekoDescriptionAttribute : SummaryAttribute
|
||||
{
|
||||
public NadekoDescriptionAttribute([CallerMemberName] string name = "")
|
||||
: base(name.ToLowerInvariant())
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
[AttributeUsage(AttributeTargets.Method)]
|
||||
internal sealed class NadekoUsageAttribute : RemarksAttribute
|
||||
{
|
||||
public NadekoUsageAttribute([CallerMemberName] string name = "")
|
||||
: base(name.ToLowerInvariant())
|
||||
{
|
||||
}
|
||||
}
|
||||
// todo remove these
|
Reference in New Issue
Block a user