Added CommandService.Unload(Module) overload

This commit is contained in:
RogueException
2016-06-26 21:00:39 -03:00
parent f6595aa73e
commit 5ac320312d
2 changed files with 14 additions and 0 deletions

View File

@@ -190,6 +190,18 @@ namespace Discord.Commands
}
}
public async Task<bool> Unload(Module module)
{
await _moduleLock.WaitAsync().ConfigureAwait(false);
try
{
return UnloadInternal(module.Instance);
}
finally
{
_moduleLock.Release();
}
}
public async Task<bool> Unload(object module)
{
await _moduleLock.WaitAsync().ConfigureAwait(false);