S
S
sterkkhov2018-02-26 20:37:51
C++ / C#
sterkkhov, 2018-02-26 20:37:51

How to ask a clarifying question to a user in the telegram api?

I create a bot that gives early received files. I work with api Telegram.Bot I
process the command method

private static Telegram.Bot.TelegramBotClient BOT;
{
BOT.OnMessage += BotOnMessageReceived;
}
private static async void BotOnMessageReceived(object sender, MessageEventArgs messageEventArgs)
        {
            Telegram.Bot.Types.Message msg = messageEventArgs.Message; 
            if (msg == null || msg.Type != MessageType.TextMessage) return;
            String Answer = "";
            switch (msg.Text)
            {//Стартовые команды
                case "/start": Answer = "Что я умею\n  ";break;
                case "Привет ":Answer = "Чем могу помочь?" ;break;
                case "/Document":Answer = "Выберите документ:"; Documents(msg) ; break;
                case "/Books": Answer = "Список:"; break;
                default: Answer = "Не знаю такой команды"; break;
            }
            await BOT.SendTextMessageAsync(msg.Chat.Id, Answer);
        }

After processing, the bot outputs files with the postscript /1,/2
How can I assume that Telegram.Bot.Types.Message msg has been updated?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question