UsersShared

class telegram.UsersShared(request_id, users, *, 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 users are equal.

Added 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.

Changed in version 21.1: The argument users is now considered for the equality comparison instead of user_ids.

Removed in version 21.2: Removed the deprecated argument and attribute user_ids.

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

  • users (Sequence[telegram.SharedUser]) –

    Information about users shared with the bot.

    Added in version 21.1.

    Changed in version 21.2: This argument is now required.

request_id[source]

Identifier of the request.

Type:

int

users[source]

Information about users shared with the bot.

Added in version 21.1.

Type:

tuple[telegram.SharedUser]

classmethod de_json(data, bot=None)[source]

See telegram.TelegramObject.de_json().