summaryrefslogtreecommitdiff
path: root/files/TG_bot_VPN-main/handlers/default_heandlers/echo.py
blob: f8f59046708583304479aaf520cb0dc70f43ca7d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
from telebot.types import Message
from loader import bot
from handlers.custom_heandlers.location_handlers import location_handler
from handlers.default_heandlers.help import bot_help
from handlers.custom_heandlers.instruction_handlers import instruction_handler


# Эхо хендлер, куда летят текстовые сообщения без указанного состояния

@bot.message_handler(state=None)
def bot_echo(message: Message):
    if message.text == "🌍 Серверы":
        location_handler(message)
    elif message.text == "❓ Справка":
        bot_help(message)
    elif message.text == "📖 Инструкция":
        instruction_handler(message)
    else:
        bot.reply_to(message, f"Введите любую команду из меню, чтобы я начал работать\n"
                              f"Либо выберите одну из кнопок, которые я вам прислал 👇")