我想通过Python编写一个电报机器人,但它不起作用。
import telebot
bot = telebot.TeleBot("my_token")
@bot.message_handler(content_types=['text'])
def sending(message):
bot.send_message(message.chat.id, message.text)
# RUN
bot.polling(non_stop=True)
Run Code Online (Sandbox Code Playgroud)
返回给我以下问题。
AttributeError:“TeleBot”对象没有属性“message_handler”