Default DependencyMap to an empty map when not supplied

This commit is contained in:
RogueException
2016-10-20 03:53:46 -03:00
parent 2cbfaa5498
commit b8102a6767
3 changed files with 10 additions and 0 deletions

View File

@@ -195,6 +195,8 @@ namespace Discord.Commands
=> Execute(context, context.Message.Content.Substring(argPos), dependencyMap, multiMatchHandling);
public async Task<IResult> Execute(CommandContext context, string input, IDependencyMap dependencyMap = null, MultiMatchHandling multiMatchHandling = MultiMatchHandling.Exception)
{
dependencyMap = dependencyMap ?? DependencyMap.Empty;
var searchResult = Search(context, input);
if (!searchResult.IsSuccess)
return searchResult;