Fix CheckPreconditions giving empty service provider

Parameter preconditions were always getting the empty service provider,
even when a custom one was provided in ExecuteAsync, which means that
preconditions which use services cannot work properly.
This commit is contained in:
FiniteReality
2017-05-08 22:15:47 +01:00
parent 32feb0a9cf
commit 1e888cde24

View File

@@ -42,7 +42,7 @@ namespace Discord.Commands
public async Task<PreconditionResult> CheckPreconditionsAsync(ICommandContext context, object arg, IServiceProvider services = null)
{
services = EmptyServiceProvider.Instance;
services = services ?? EmptyServiceProvider.Instance;
foreach (var precondition in Preconditions)
{