| @@ -73,7 +73,7 @@ namespace Discord.Commands | |||||
| _moduleLock.Release(); | _moduleLock.Release(); | ||||
| } | } | ||||
| } | } | ||||
| public async Task<ModuleInfo> AddModuleAsync<T>() | |||||
| public async Task<ModuleInfo> AddModuleAsync<T>() where T : ModuleBase | |||||
| { | { | ||||
| await _moduleLock.WaitAsync().ConfigureAwait(false); | await _moduleLock.WaitAsync().ConfigureAwait(false); | ||||
| try | try | ||||
| @@ -86,7 +86,7 @@ namespace Discord.Commands | |||||
| var module = ModuleClassBuilder.Build(this, typeInfo).FirstOrDefault(); | var module = ModuleClassBuilder.Build(this, typeInfo).FirstOrDefault(); | ||||
| if (module.Value == default(ModuleInfo)) | if (module.Value == default(ModuleInfo)) | ||||
| throw new InvalidOperationException($"Could not build the module {typeof(T).FullName}, did you pass an invalid type?"); | |||||
| throw new InvalidOperationException($"Could not build the module {typeof(T).FullName}"); | |||||
| _typedModuleDefs[module.Key] = module.Value; | _typedModuleDefs[module.Key] = module.Value; | ||||
| @@ -143,7 +143,7 @@ namespace Discord.Commands | |||||
| _moduleLock.Release(); | _moduleLock.Release(); | ||||
| } | } | ||||
| } | } | ||||
| public async Task<bool> RemoveModuleAsync<T>() | |||||
| public async Task<bool> RemoveModuleAsync<T>() where T : ModuleBase | |||||
| { | { | ||||
| await _moduleLock.WaitAsync().ConfigureAwait(false); | await _moduleLock.WaitAsync().ConfigureAwait(false); | ||||
| try | try | ||||