Esempio n. 1
0
        public override bool?ParseStartStopCommands(Message message, ref bool continuation)
        {
            bool?is_alive = null;

            if (message.Text != null)
            {
                string text = message.Text.ToLower();
                if (StartCommands.Contains(text))
                {
                    is_alive     = true;
                    continuation = false;
                    if (PrivateChatGreeting != null && !PrivateChatGreeting.Equals(string.Empty))
                    {
                        sender_to_tg.Put(factory.CreateMessage(new ChatId(message.Chat.Id),
                                                               PrivateChatGreeting, keyboardMarkup: CommonFunctions.CreateInlineKeyboard(this.MainMenuDescription)));
                    }
                }
                else if (StopCommands.Contains(text))
                {
                    is_alive     = false;
                    continuation = false;
                }
            }
            return(is_alive);
        }
Esempio n. 2
0
        public override bool?ParseStartStopCommands(Message message, ref bool continuation)
        {
            bool?is_alive = null;

            if (message.Text != null)
            {
                string text = message.Text.ToLower();
                if (StartCommands.Contains(text))
                {
                    is_alive     = true;
                    continuation = false;
                    if (PrivateChatGreeting != null && !PrivateChatGreeting.Equals(string.Empty))
                    {
                        SendDefaultMenu(message.Chat.Id);
                    }
                }
                else if (StopCommands.Contains(text))
                {
                    is_alive     = false;
                    continuation = false;
                }
            }
            return(is_alive);
        }