【发布时间】:2022-08-15 03:52:59
【问题描述】:
我想通过使用他的电报和 python_telegram_bot 库将消息发送给任何人。
我可以使用以下代码将消息发送给我,但如果我输入其他人的 id,则我无法发送消息,它会显示 chat not found 消息。
updater = Updater(mybot_token, use_context=True)
updater.bot.send_message(chat_id = receiver_id, text=\"welcome\")
我不确定为什么只能将消息发送给我,而不是其他人,即使我将 chat_id 作为他们的电报 ID。
标签: telegram-bot message python-telegram-bot sendmessage