【发布时间】:2022-01-05 20:26:28
【问题描述】:
我正在尝试使用pyTelegrambotApi 构建一个电报机器人。但是我在从机器人发送消息时遇到错误。代码如下。
import telebot
@bot.message_handler(commands=['start', 'help'])
def send_welcome(message):
bot.send_message(ID,"Thanks for adding me!!")
bot.infinity_polling()
这里的 ID 是我使用 similar question 中提到的 rawdatabot 获得的 ID。但这里的问题是它只响应我的命令。当其他成员发出相同的命令时,该机器人不适用于其他成员。有人可以在这里指出错误吗?
【问题讨论】:
标签: python python-3.x telegram telegram-bot py-telegram-bot-api