what information about user can a telegram bot access?

試著忘記壹切 提交于 2019-12-05 01:25:40

A bot has access to:

  • The user's unique identifier (user id)
  • The user's first name
  • The user's last name (if the user has specified his last name in the settings)
  • The user's username (if the user has configured a username)

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.

Sources:

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!