public async Task ExecuteAsync(Message message)
        {
            if (!string.IsNullOrEmpty(message.Text))
            {
                await _bot.SendTextMessageAsync(message.Chat, _constants.Messages.SendTitle);

                _states.SetCategory(message.Chat.Id, message.Text);
                _states.AddState(message.Chat.Id, Name, NextName);
            }
            else
            {
                await _bot.SendTextMessageAsync(message.Chat, _constants.Messages.ChooseCategory, replyMarkup : _constants.GetReplyKeyboardMarkupByCategories());
            }
        }
Exemple #2
0
        public async Task ExecuteAsync(Message message)
        {
            switch (message.Text.ToLower())
            {
            case "да":
                _states.AddState(message.Chat.Id, Name, NextName);
                await _bot.SendTextMessageAsync(message.Chat.Id, _constants.Messages.ChooseCategory, replyMarkup : _constants.GetReplyKeyboardMarkupByCategories());

                break;

            case "нет":
                _states.ClearState(message.Chat.Id);
                await _bot.SendTextMessageAsync(message.Chat.Id,
                                                _constants.Messages.IfIsNotNew);

                break;
            }
        }