Browse Source

Fix: remove Module from _typedModuleDefs

pull/2417/head
Julian 2 years ago
parent
commit
f279ab7f8c
1 changed files with 5 additions and 0 deletions
  1. +5
    -0
      src/Discord.Net.Commands/CommandService.cs

+ 5
- 0
src/Discord.Net.Commands/CommandService.cs View File

@@ -270,6 +270,11 @@ namespace Discord.Commands
await _moduleLock.WaitAsync().ConfigureAwait(false);
try
{
var typeModulePair = _typedModuleDefs.FirstOrDefault(x => x.Value.Equals(module));

if (!typeModulePair.Equals(default(KeyValuePair<Type, ModuleInfo>)))
_typedModuleDefs.TryRemove(typeModulePair.Key, out var _);

return RemoveModuleInternal(module);
}
finally


Loading…
Cancel
Save