0
from langdetect import detect
import telebot
import config

bot = telebot.TeleBot(config.token)

@bot.message_handler(content_types=["text"])
def weather(message):
    det = detect(message.text)
    if det == "ru":
        bot.send_message(message.chat.id, "Sorry, system ain't support this language")
    elif det == "bg":
        bot.send_message(message.chat.id, "Sorry, system ain't support this language")

bot.infinity_polling()

0

Ваш ответ

By clicking “Отправить ответ”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Посмотрите другие вопросы с метками или задайте свой вопрос.