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); } }
public void ProcessInput(long chatId, string input, TelegramBotClientFacade telegramBotClientFacade, CurrentStateHolder stateHolder) { stateHolder.SetNextState(new OnStartSelectState()); }