From 6d8ccb7aef5b1667c2ac1e257ec56494f2a37128 Mon Sep 17 00:00:00 2001 From: xpamych Date: Thu, 9 Mar 2023 16:45:39 +0300 Subject: [PATCH] =?UTF-8?q?=D0=B4=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=20=D0=B7=D0=B0=D0=BF=D1=83=D1=81=D0=BA=20=D0=BA=D0=B0?= =?UTF-8?q?=D1=80=D1=82=D1=8B=20=D0=BF=D0=BE=20=D0=BD=D0=B0=D0=B6=D0=B0?= =?UTF-8?q?=D1=82=D0=B8=D1=8E=20=D0=BD=D0=B0=20=D0=BA=D0=BB=D0=B0=D0=B2?= =?UTF-8?q?=D0=B8=D1=88=D1=83=20=D1=81=20=D0=BD=D0=B0=D0=B7=D0=B2=D0=B0?= =?UTF-8?q?=D0=BD=D0=B8=D0=B5=D0=BC=20=D0=BA=D0=B0=D1=80=D1=82=D1=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hlna_bot.py | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/hlna_bot.py b/hlna_bot.py index ed42642..e65a93a 100755 --- a/hlna_bot.py +++ b/hlna_bot.py @@ -77,7 +77,7 @@ hlna_bot = telebot.TeleBot(f"{k_api}", parse_mode=None) @hlna_bot.message_handler(commands=["start"]) -def m_start(m): +def m_mainmenu(m): menu = types.ReplyKeyboardMarkup(resize_keyboard=True) k_start = types.KeyboardButton("馃 小褌邪褉褌") k_stop = types.KeyboardButton("馃 袙褘泻谢褞褔懈褌褜") @@ -117,13 +117,22 @@ def m_chose(m): k_back = types.KeyboardButton("袧邪蟹邪写") menu_start.add(k_back) hlna_bot.send_message(m.chat.id, text="{0.first_name}, 胁褘斜械褉懈 泻邪褉褌褍".format(m.from_user), reply_markup=menu_start) - elif (m.text.strip() == '馃Ь 小褌邪褌褍褋'): + elif m.text.strip() == '馃Ь 小褌邪褌褍褋': check_status(m) - elif m.text.strip() == '袧邪蟹邪写': - m_start(m) - elif m.text.strip() == 'TheIsland': - hlna.start() + m_mainmenu(m) + for i in list_config: + if m.text.strip() == f'{i}': + hlna.print_line(f"小褌邪褉褌 泻邪褉褌褘 {i}") + hlna.start() + +# @hlna_bot.message_handler(content_types=["text"]) +# def m_mapstart(m): +# hlna.print_line("小褌邪褉褌 泻邪褉褌褘") +# for i in list_config: +# if m.text.strip() == f'{i}': +# hlna.print_line(f"小褌邪褉褌 泻邪褉褌褘 {i}") +# hlna.start() def m_install(m):