Replace TryGetValue call with TryRemove call (#586)

Resolves #584
This commit is contained in:
Finite Reality
2017-03-23 14:03:06 +00:00
committed by RogueException
parent 35d7a0cec8
commit ca18eb0eb4

View File

@@ -159,8 +159,7 @@ namespace Discord.Commands
try
{
ModuleInfo module;
_typedModuleDefs.TryGetValue(typeof(T), out module);
if (module == default(ModuleInfo))
if (!_typedModuleDefs.TryRemove(typeof(T), out module))
return false;
return RemoveModuleInternal(module);