Added support for custom ModuleBase command contexts. Added SocketCommandContext/RpcCommandContext.

This commit is contained in:
RogueException
2016-12-23 16:52:32 -04:00
parent 1965c0539a
commit 2c075e186a
32 changed files with 138 additions and 53 deletions

View File

@@ -41,7 +41,7 @@ namespace Discord.Commands
_reader = builder.TypeReader;
}
public async Task<PreconditionResult> CheckPreconditionsAsync(CommandContext context, object[] args, IDependencyMap map = null)
public async Task<PreconditionResult> CheckPreconditionsAsync(ICommandContext context, object[] args, IDependencyMap map = null)
{
if (map == null)
map = DependencyMap.Empty;
@@ -61,7 +61,7 @@ namespace Discord.Commands
return PreconditionResult.FromSuccess();
}
public async Task<TypeReaderResult> Parse(CommandContext context, string input)
public async Task<TypeReaderResult> Parse(ICommandContext context, string input)
{
return await _reader.Read(context, input).ConfigureAwait(false);
}