добавлен запуск карты по нажатию на клавишу с названием карты
This commit is contained in:
parent
ca1623fa75
commit
6d8ccb7aef
19
hlna_bot.py
19
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,14 +117,23 @@ 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':
|
||||
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):
|
||||
if m.text.strip() == 'Установить':
|
||||
|
Loading…
Reference in New Issue
Block a user