using System;
using System.Collections.Generic;
using System.Threading.Tasks;
namespace Discord.Commands
{
public struct CommandMatch
{
/// The command that matches the search result.
public CommandInfo Command { get; }
/// The alias of the command.
public string Alias { get; }
public CommandMatch(CommandInfo command, string alias)
{
Command = command;
Alias = alias;
}
public Task CheckPreconditionsAsync(ICommandContext context, IServiceProvider services = null)
=> Command.CheckPreconditionsAsync(context, services);
public Task ParseAsync(ICommandContext context, SearchResult searchResult, PreconditionResult preconditionResult = null, IServiceProvider services = null)
=> Command.ParseAsync(context, Alias.Length, searchResult, preconditionResult, services);
public Task ExecuteAsync(ICommandContext context, IEnumerable