【发布时间】:2020-10-09 11:30:43
【问题描述】:
我正在使用 python3.x 的 python-telegram-bot 库在 python 中编写 Telegram 机器人 这是一个仅供私人使用的机器人(我和一些亲戚),所以我想防止其他用户使用它。我的想法是创建一个授权用户 ID 列表,并且机器人不能回答从不在列表中的用户收到的消息。我该怎么做?
编辑:我对 python 和 python-telegram-bot 都是新手。如果可能的话,我希望以代码 sn-p 为例 =)。
【问题讨论】:
-
@0stone0 它没有 - 它使用
telebot,但我使用python-telegram-bot。不过,我正在研究the linked question 的解决方案。
标签: python-3.x telegram python-telegram-bot restriction