小编Արմ*_*յան的帖子

我正在用 python 编写一个电报机器人

我想通过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”

python telegram telegram-bot

2
推荐指数
1
解决办法
5133
查看次数

标签 统计

python ×1

telegram ×1

telegram-bot ×1