我创建了一个电报机器人并将其添加到我的电报频道中。现在,当我的 python 程序中发生某些情况时,我想使用它向我的频道发送消息。例如,我有一个 python 程序,每 15 秒检查一次天气,当天气发生变化时,我希望我的机器人将新的天气信息发送到我的电报频道。
所以我的问题是,我该怎么做?我陷入困境,因为 python-telegram-bot 需要用户发送消息才能触发,或者需要预定订单,而我无法安排它,因为我不知道天气何时会发生变化。
python telegram python-telegram-bot telegram-bot
python ×1
python-telegram-bot ×1
telegram ×1
telegram-bot ×1