Merge pull request #108 from khionu/patch-1

We all do it now and then <3
This commit is contained in:
RogueException
2016-07-07 23:44:06 -03:00
committed by GitHub

View File

@@ -144,7 +144,7 @@ namespace Discord.Commands
var typeInfo = moduleInstance.GetType().GetTypeInfo(); var typeInfo = moduleInstance.GetType().GetTypeInfo();
var moduleAttr = typeInfo.GetCustomAttribute<ModuleAttribute>(); var moduleAttr = typeInfo.GetCustomAttribute<ModuleAttribute>();
if (moduleAttr != null) if (moduleAttr == null)
throw new ArgumentException($"Modules must be marked with ModuleAttribute."); throw new ArgumentException($"Modules must be marked with ModuleAttribute.");
return LoadInternal(moduleInstance, moduleAttr, typeInfo); return LoadInternal(moduleInstance, moduleAttr, typeInfo);