-1

При запуске бота ничего не происходит. Пишу в IDLE и как я понял мне нужно проложить путь к интерпретатору, но я не знаю как это сделать.

import telebot

bot=telebot.TeleBot('1423090833:AAFlAxDW__sniDumjiBqoHpXKKtxRhh0w_8')
@bot.message_handler(comands='hi')
def welcome(message):
    bot.reply_to(message='hello men')
@botmessage_handler(func=lambda m: True)
def echo(mesage):
    if message.text =='how are you':
        bot.reply_to("I'm fine because I just simple bot")
    
bot.polling()

1 ответ 1

0

По идее должно работать:

import telebot

bot = telebot.TeleBot('1423090833:AAFlAxDW__sniDumjiBqoHpXKKtxRhh0w_8')


@bot.message_handler(commands='/hi')
def welcome(message):
    bot.reply_to(message='hello men')

@bot.message_handler(func=lambda m: True)
def echo(message):
    if message.text == 'how are you':
        bot.reply_to(message.chat.id, "I'm fine because I just simple bot")
    
bot.polling()

Ваш ответ

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