User¶
- class litegram.types.user.User(*, id: int, is_bot: bool, first_name: str, last_name: str | None = None, username: str | None = None, language_code: str | None = None, is_premium: bool | None = None, added_to_attachment_menu: bool | None = None, can_join_groups: bool | None = None, can_read_all_group_messages: bool | None = None, supports_inline_queries: bool | None = None, can_connect_to_business: bool | None = None, has_main_web_app: bool | None = None, has_topics_enabled: bool | None = None, **extra_data: Any)[source]¶
This object represents a Telegram user or bot.
Source: https://core.telegram.org/bots/api#user
- id: int¶
Unique identifier for this user or bot. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier.
- language_code: str | None¶
Optional. IETF language tag of the user’s language
Optional.
True, if this user is a Telegram Premium user
Optional.
True, if this user added the bot to the attachment menu
- can_join_groups: bool | None¶
Optional.
True, if the bot can be invited to groups. Returned only inlitegram.methods.get_me.GetMe.
- can_read_all_group_messages: bool | None¶
Optional.
True, if privacy mode is disabled for the bot. Returned only inlitegram.methods.get_me.GetMe.
- supports_inline_queries: bool | None¶
Optional.
True, if the bot supports inline queries. Returned only inlitegram.methods.get_me.GetMe.
- can_connect_to_business: bool | None¶
Optional.
True, if the bot can be connected to a Telegram Business account to receive its messages. Returned only inlitegram.methods.get_me.GetMe.
- has_main_web_app: bool | None¶
Optional.
True, if the bot has a main Web App. Returned only inlitegram.methods.get_me.GetMe.
- has_topics_enabled: bool | None¶
Optional.
True, if the bot has forum topic mode enabled in private chats. Returned only inlitegram.methods.get_me.GetMe.
- get_profile_photos(offset: int | None = None, limit: int | None = None, **kwargs: Any) GetUserProfilePhotos[source]¶
Shortcut for method
litegram.methods.get_user_profile_photos.GetUserProfilePhotoswill automatically fill method attributes:user_id
Use this method to get a list of profile pictures for a user. Returns a
litegram.types.user_profile_photos.UserProfilePhotosobject.Source: https://core.telegram.org/bots/api#getuserprofilephotos
- Parameters:
offset – Sequential number of the first photo to be returned. By default, all photos are returned.
limit – Limits the number of photos to be retrieved. Values between 1-100 are accepted. Defaults to 100.
- Returns:
instance of method
litegram.methods.get_user_profile_photos.GetUserProfilePhotos