diff --git a/src/Discord.Net.Commands/Command.cs b/src/Discord.Net.Commands/Command.cs index f9578d154..9b89b2cc0 100644 --- a/src/Discord.Net.Commands/Command.cs +++ b/src/Discord.Net.Commands/Command.cs @@ -75,11 +75,17 @@ namespace Discord.Commands continue; } - var typeInfo = type.GetTypeInfo(); - if (typeInfo.IsEnum) - type = Enum.GetUnderlyingType(type); - var reader = Module.Service.GetTypeReader(type); + + if (reader == null) + { + var typeInfo = type.GetTypeInfo(); + if (typeInfo.IsEnum) + type = Enum.GetUnderlyingType(type); + + reader = Module.Service.GetTypeReader(type); + } + if (reader == null) throw new InvalidOperationException($"{type.FullName} is not supported as a command parameter, are you missing a TypeReader?");