UsersShared¶
- class telegram.UsersShared(request_id, user_ids=None, users=None, *, 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
andusers
are equal.Available In
New in version 20.8: Bot API 7.0 replaces
UserShared
with this class. The only difference is that now theuser_ids
is a sequence instead of a single integer.Changed in version 21.1: The argument
users
is now considered for the equality comparison instead ofuser_ids
.- Parameters:
request_id (
int
) – Identifier of the request.users (Sequence[
telegram.SharedUser
]) –Information about users shared with the bot.
New in version 21.1.
Deprecated since version 21.1: In future versions, this argument will become keyword only.
user_ids (Sequence[
int
], optional) –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.
Deprecated since version 21.1: Bot API 7.2 introduced by
users
, replacing this argument. Hence, this argument is now optional and will be removed in future versions.
- users[source]¶
Information about users shared with the bot.
New in version 21.1.
- Type:
Tuple[
telegram.SharedUser
]
- property 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.
Deprecated since version 21.1: As Bot API 7.2 replaces this attribute with
users
, this attribute will be removed in future versions.- Type:
Tuple[
int
]