public IActionResult StopBot(string secretKey) { if (String.CompareOrdinal(_bot.SecretKey, secretKey) != 0) { return(StatusCode(403)); } _bot.Stop(); return(Json("Bot stopped")); }
public void Close() { if (timerUpdateUserMessages.Enabled) { timerUpdateUserMessages.Stop(); } db.Dispose(); if (telegramBot.IsReceiving()) { telegramBot.Stop(); } }