UsersShared

class telegram.UsersShared(request_id, user_ids, *, api_kwargs=None)[source]

Bases: telegram.TelegramObject

This object contains information about the user whose identifier was shared with the bot using a telegram.KeyboardButtonRequestUsers button.

Objects of this class are comparable in terms of equality. Two objects of this class are considered equal, if their request_id and user_ids are equal.

New in version 20.8: Bot API 7.0 replaces UserShared with this class. The only difference is that now the user_ids is a sequence instead of a single integer.

Parameters:
  • request_id (int) – Identifier of the request.

  • user_ids (Sequence[int]) – Identifiers of the shared users. These numbers may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting them. But they have at most 52 significant bits, so 64-bit integers or double-precision float types are safe for storing these identifiers. The bot may not have access to the users and could be unable to use these identifiers, unless the users are already known to the bot by some other means.

request_id[source]

Identifier of the request.

Type:

int

user_ids[source]

Identifiers of the shared users. These numbers may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting them. But they have at most 52 significant bits, so 64-bit integers or double-precision float types are safe for storing these identifiers. The bot may not have access to the users and could be unable to use these identifiers, unless the users are already known to the bot by some other means.

Type:

Tuple[int]