private async Task <IActionResult> SendBotInfo() { BotMessage = new BotInfoMessage(Argumetns[0]); await EditMessage(BotMessage.BuildMsg()); return(OkResult); }
private async Task <IActionResult> CheckPay(int BotId, int InvoiceId) { try { BotConnectFunction = new BotConnectFunction(); base.SendAction(Telegram.Bot.Types.Enums.ChatAction.Typing); var bot = await BotConnectFunction.CheckPay(BotId, InvoiceId); BotMessage = new BotInfoMessage(bot); await base.EditMessage(BotMessage.BuildMsg()); return(OkResult); } catch (BotInstallExeption.BotIsLaunchedExeption e) { await base.AnswerCallback(e.Message, true); await SendMessage(Convert.ToInt32(BotInfo.OwnerChatId), new BotMessage { TextMessage = e.Message }); return(OkResult); } catch (Exception e) { await base.AnswerCallback(e.Message, true); await SendMessage(Convert.ToInt32(BotInfo.OwnerChatId), new BotMessage { TextMessage = e.Message }); return(OkResult); } finally { BotConnectFunction.Dispose(); } }