public async Task ExecuteCommand(TelegramCommand command) { //TODO: Maybe throw exception or log if (!CanExecute(command)) { return; } await _botService.Client.SendTextMessageAsync(command.Message.Chat.Id, command.Rest); }
public bool CanExecute(TelegramCommand command) { return(command != null && command.IsCommand && command.CommandName == Command && !string.IsNullOrWhiteSpace(command.Rest)); }