public override void Execute(Message message, TelegramBotClient client) { var chatId = message.Chat.Id; var messageId = message.MessageId; bool flag = Data.check(message.Chat.Id); if (message.Text == "/rpn") { start(message, client); } else { client.SendTextMessageAsync(chatId, ReversePolishNotion.Get_RPN(message.Text)); Data.delete(chatId); } }
public override void Execute(Message message, TelegramBotClient client) { var chatId = message.Chat.Id; var messageId = message.MessageId; bool flag = Data.check(message.Chat.Id); if (message.Text == "/calculator") { start(message, client); } else { client.SendTextMessageAsync(chatId, Convert.ToString(Calculation.Computation(ReversePolishNotion.Get_RPN(message.Text)))); Data.delete(chatId); } }