Answer the question
In order to leave comments, you need to log in
Why is telegram bot not working?
import telebot
import config
bot = telebot.TeleBot(config.TOKEN)
@bot.message.handler(content_types=['text'])
def func(message):
bot.send_message(message.chat.id, message.text)
bot.polling(none_stop=True)
Answer the question
In order to leave comments, you need to log in
You specified
the decarator incorrectly Need @bot.message_handler()
Not @bot.message.haner()
Not a dot, but an underscore
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question