mirror of
https://gitlab.com/Kwoth/nadekobot.git
synced 2025-09-12 10:18:27 -04:00
NadekoBot.Extensions should now be fully annotated with nullable reference types as well as many classes from NadekoBot.Common
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
namespace NadekoBot.Common.Attributes;
|
||||
|
||||
@@ -9,4 +9,4 @@ public sealed class AliasesAttribute : AliasAttribute
|
||||
: base(CommandNameLoadHelper.GetAliasesFor(memberName))
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -1,4 +1,4 @@
|
||||
namespace NadekoBot.Common.Attributes;
|
||||
namespace NadekoBot.Common.Attributes;
|
||||
|
||||
public static class CommandNameLoadHelper
|
||||
{
|
||||
@@ -26,4 +26,4 @@ public static class CommandNameLoadHelper
|
||||
: methodName;
|
||||
return toReturn;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -1,4 +1,4 @@
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
namespace NadekoBot.Common.Attributes;
|
||||
|
||||
@@ -10,4 +10,4 @@ public sealed class NadekoCommandAttribute : CommandAttribute
|
||||
=> this.MethodName = memberName.ToLowerInvariant();
|
||||
|
||||
public string MethodName { get; }
|
||||
}
|
||||
}
|
||||
|
@@ -1,4 +1,4 @@
|
||||
namespace NadekoBot.Common.Attributes;
|
||||
namespace NadekoBot.Common.Attributes;
|
||||
|
||||
[AttributeUsage(AttributeTargets.Class)]
|
||||
internal sealed class NadekoModuleAttribute : GroupAttribute
|
||||
@@ -7,4 +7,4 @@ internal sealed class NadekoModuleAttribute : GroupAttribute
|
||||
: base(moduleName)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -1,4 +1,4 @@
|
||||
namespace NadekoBot.Common.Attributes;
|
||||
namespace NadekoBot.Common.Attributes;
|
||||
|
||||
[AttributeUsage(AttributeTargets.Method)]
|
||||
public sealed class NadekoOptionsAttribute : Attribute
|
||||
@@ -7,4 +7,4 @@ public sealed class NadekoOptionsAttribute : Attribute
|
||||
|
||||
public NadekoOptionsAttribute(Type t)
|
||||
=> this.OptionType = t;
|
||||
}
|
||||
}
|
||||
|
@@ -1,4 +1,4 @@
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
|
||||
namespace NadekoBot.Common.Attributes;
|
||||
|
||||
@@ -17,4 +17,4 @@ public sealed class OwnerOnlyAttribute : PreconditionAttribute
|
||||
: PreconditionResult.FromError("Not owner")
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -1,4 +1,4 @@
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
|
||||
namespace NadekoBot.Common.Attributes;
|
||||
|
||||
@@ -33,4 +33,4 @@ public sealed class RatelimitAttribute : PreconditionAttribute
|
||||
|
||||
return Task.FromResult(PreconditionResult.FromError(msgContent));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -1,9 +1,9 @@
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using NadekoBot.Modules.Administration.Services;
|
||||
|
||||
namespace Discord;
|
||||
|
||||
[AttributeUsage(AttributeTargets.Method, AllowMultiple = false)]
|
||||
[AttributeUsage(AttributeTargets.Method)]
|
||||
public class UserPermAttribute : RequireUserPermissionAttribute
|
||||
{
|
||||
public override Task<PreconditionResult> CheckPermissionsAsync(
|
||||
@@ -27,4 +27,4 @@ public class UserPermAttribute : RequireUserPermissionAttribute
|
||||
: base(permission)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user