Skip to content

Commit

Permalink
Make the "cannot be loaded" warning fire correctly (#729)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
FiniteReality authored and Auralytical committed Jul 5, 2017
1 parent b6dcc9e commit d2afb06
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Discord.Net.Commands/Builders/ModuleClassBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ bool IsLoadableModule(TypeInfo info)

foreach (var typeInfo in assembly.DefinedTypes)
{
if (typeInfo.IsPublic)
if (typeInfo.IsPublic || typeInfo.IsNestedPublic)
{
if (IsValidModuleDefinition(typeInfo) &&
!typeInfo.IsDefined(typeof(DontAutoLoadAttribute)))
Expand Down Expand Up @@ -70,7 +70,7 @@ public static async Task<Dictionary<Type, ModuleInfo>> BuildAsync(IEnumerable<Ty
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;
}
Expand Down

0 comments on commit d2afb06

Please sign in to comment.