Browse Source

Make the "cannot be loaded" warning fire correctly (#729)

Why am I such a bad programmer? Maybe I'm just bad with git. Maybe I'm
just bad in general. Maybe I should resign from programming.
tags/1.0.1
Finite Reality RogueException 7 years ago
parent
commit
d2afb06942
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      src/Discord.Net.Commands/Builders/ModuleClassBuilder.cs

+ 2
- 2
src/Discord.Net.Commands/Builders/ModuleClassBuilder.cs View File

@@ -24,7 +24,7 @@ namespace Discord.Commands

foreach (var typeInfo in assembly.DefinedTypes)
{
if (typeInfo.IsPublic)
if (typeInfo.IsPublic || typeInfo.IsNestedPublic)
{
if (IsValidModuleDefinition(typeInfo) &&
!typeInfo.IsDefined(typeof(DontAutoLoadAttribute)))
@@ -70,7 +70,7 @@ namespace Discord.Commands
result[typeInfo.AsType()] = module.Build(service);
}

await service._cmdLogger.DebugAsync($"Successfully built and loaded {builtTypes.Count} modules.").ConfigureAwait(false);
await service._cmdLogger.DebugAsync($"Successfully built {builtTypes.Count} modules.").ConfigureAwait(false);

return result;
}


Loading…
Cancel
Save