minor cleanup

This commit is contained in:
Kwoth
2023-04-06 21:59:11 +02:00
parent 069f8fab9d
commit 2c63b1cce7
3 changed files with 2 additions and 16 deletions

View File

@@ -12,7 +12,7 @@ public sealed class OnlyPublicBotAttribute : PreconditionAttribute
CommandInfo command,
IServiceProvider services)
{
#if GLOBAL_NADEKO
#if GLOBAL_NADEKO || DEBUG
return Task.FromResult(PreconditionResult.FromSuccess());
#else
return Task.FromResult(PreconditionResult.FromError("Only available on the public bot."));

View File

@@ -90,7 +90,7 @@ public sealed class CommandsUtilityService : ICommandsUtilityService, INService
return strs;
}
public static Type GetNadekoOptionType(IEnumerable<Attribute> attributes)
public static Type? GetNadekoOptionType(IEnumerable<Attribute> attributes)
=> attributes
.Select(a => a.GetType())
.Where(a => a.IsGenericType

View File

@@ -1,14 +0,0 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="7.0.0" />
<PackageReference Include="OneOf" Version="3.0.223" />
</ItemGroup>
</Project>