Бот отвечает на одно и тоже сообщение, не двигается дальше
using WebApplication3.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System.Web.Http;
using System.Web.Http.Results;
using Telegram.Bot.Types;
using System.Web.Mvc;
namespace WebApplication3.Controllers
{
public class TelegramController : ApiController
{
[System.Web.Http.Route(@"api/telegram/update")]
public async Task<OkResult> Update([FromBody] Update update)
{
var commands = Bot.commands;
var message = update.Message;
var client = await Bot.Get();
foreach (var command in commands)
{
if (command.Contains(message.Text))
{
command.Execute(message, client);
}
}
return Ok();
}
}
}