Don't attempt to load types with generic parameters as a module
This fixes an issue where custom ModuleBases that contained a generic parameter would be loaded as a module - only to fail when trying to be built. Realistically, ModuleBases _should_ be abstract - but it was still a bug that we allowed them to be included as a module.
This commit is contained in:
@@ -307,7 +307,8 @@ namespace Discord.Commands
|
||||
private static bool IsValidModuleDefinition(TypeInfo typeInfo)
|
||||
{
|
||||
return _moduleTypeInfo.IsAssignableFrom(typeInfo) &&
|
||||
!typeInfo.IsAbstract;
|
||||
!typeInfo.IsAbstract &&
|
||||
!typeInfo.ContainsGenericParameters;
|
||||
}
|
||||
|
||||
private static bool IsValidCommandDefinition(MethodInfo methodInfo)
|
||||
|
||||
Reference in New Issue
Block a user