Browse Source

Replace TryGetValue call with TryRemove call

Resolves #584
pull/586/head
FiniteReality 8 years ago
parent
commit
d7b3b0f0cb
1 changed files with 1 additions and 2 deletions
  1. +1
    -2
      src/Discord.Net.Commands/CommandService.cs

+ 1
- 2
src/Discord.Net.Commands/CommandService.cs 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);


Loading…
Cancel
Save