예제 #1
0
        public void ProcessInput(
            long chatId,
            string input,
            TelegramBotClientFacade telegramBotClientFacade,
            CurrentStateHolder stateHolder)
        {
            var selectedButton = GetButtons()
                                 .FirstOrDefault(p => input
                                                 .Equals(p, StringComparison.InvariantCultureIgnoreCase));

            if (selectedButton == null)
            {
                telegramBotClientFacade
                .SendButtonMessageToChat(chatId, GetButtons());
            }
            else
            {
                var nextState = ButtonToNextStateMapper(selectedButton);
                nextState.PrerenderDefaultOutput(chatId, telegramBotClientFacade);
                stateHolder.SetNextState(nextState);
            }
        }
예제 #2
0
 public void ProcessInput(long chatId,
                          string input,
                          TelegramBotClientFacade telegramBotClientFacade, CurrentStateHolder stateHolder)
 {
     stateHolder.SetNextState(new OnStartSelectState());
 }