且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

电报机器人可以访问有关用户的哪些信息?

更新时间:2023-11-19 12:30:22

机器人可以访问:

  • 用户的唯一标识符(用户 ID)
  • 用户的名字
  • 用户的姓氏(如果用户在设置中指定了他的姓氏)
  • 用户的用户名(如果用户已经配置了用户名)

机器人只能从消息中提取此信息(即它不能查询群组成员的姓名).

The bot can only extract this info from a Message (i.e. it cannot query the group member's names).

如果隐私模式被禁用,机器人可以读取群组中发送的所有消息.如果它启用,则机器人只接收直接针对机器人的消息(例如,使用命令或回复来自机器人的消息).用户可以在群组成员列表中检查机器人是否启用/禁用隐私模式.

If privacy mode is disabled, the bot can read all messages sent in a group. If it is enabled, a bot is only receives messages aimed directly at the bot (e.g. using a command or a reply to a message from the bot). A user is able to check whether a bot has Privacy mode enabled/disabled in the list of group members.

旁注:将机器人添加到禁用隐私模式的群组时要小心,因为它们可能会恶意存储消息.

Sidenote: take care when adding bots to a group that have privacy mode disabled, since they might be maliciously storing messages.

来源: