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