User
- class pyrogram.types.User
A Telegram user or bot.
- Parameters:
id (
int) – Unique identifier for this user or bot.is_self (
bool, optional) – True, if this user is you yourself.is_contact (
bool, optional) – True, if this user is in your contacts.is_mutual_contact (
bool, optional) – True, if you both have each other’s contact.is_deleted (
bool, optional) – True, if this user is deleted.is_bot (
bool, optional) – True, if this user is a bot.is_verified (
bool, optional) – True, if this user has been verified by Telegram.is_restricted (
bool, optional) – True, if this user has been restricted. Bots only. See restriction_reason for details.is_scam (
bool, optional) – True, if this user has been flagged for scam.is_fake (
bool, optional) – True, if this user has been flagged for impersonation.is_support (
bool, optional) – True, if this user is part of the Telegram support team.is_premium (
bool, optional) – True, if this user is a premium user.is_contacts_only (
bool, optional) – True, if this user is only allow incoming message from users in their contacts/premium users.is_bot_business (
bool, optional) – True, if this bot can connect to business account.is_bot_can_edit (
bool, optional) – True, if this bot can be edited by the current user.is_close_friend (
bool, optional) – True, if this user is a close friend.is_stories_hidden (
bool, optional) – True, if stories from this user are hidden.is_stories_unavailable (
bool, optional) – True, if stories from this user are unavailable.is_bot_has_main_app (
bool, optional) – True, if this bot has a main app.is_bot_forum_view (
bool, optional) – True, if this bot has forum view enabled.is_bot_forum_can_manage_topics (
bool, optional) – True, if this bot can manage forum topics.first_name (
str, optional) – User’s or bot’s first name.last_name (
str, optional) – User’s or bot’s last name.status (
UserStatus, optional) – User’s last seen & online status.None, for bots.last_online_date (
datetime, optional) – Last online date of a user. Only available in case status isOFFLINE.next_offline_date (
datetime, optional) – Date when a user will automatically go offline. Only available in case status isONLINE.username (
str, optional) – User’s or bot’s username.usernames (List of
Username, optional) – List of all chat (fragment) usernames; for private chats, supergroups and channels. Returned only inget_chat().language_code (
str, optional) – IETF language tag of the user’s language.emoji_status (
EmojiStatus, optional) – Emoji status.dc_id (
int, optional) – User’s or bot’s assigned DC (data center). Available only in case the user has set a public profile photo. Note that this information is approximate; it is based on where Telegram stores a user profile pictures and does not by any means tell you the user location (i.e. a user might travel far away, but will still connect to its assigned DC). More info at FAQs.phone_number (
str, optional) – User’s phone number.photo (
ChatPhoto, optional) – User’s or bot’s current profile photo. Suitable for downloads only.restrictions (List of
Restriction, optional) – The list of reasons why this bot might be unavailable to some users. This field is available only in case is_restricted is True.full_name (
str, optional) – User’s or bot’s full name.mention (
str, property) – Generate a text mention for this user. You can useuser.mention()to mention the user using their first name (styled using html), oruser.mention("another name")for a custom name. To choose a different style (“html” or “md”/”markdown”) useuser.mention(style="md").reply_color (
ChatColor, optional) – Chat reply color.profile_color (
ChatColor, optional) – Chat profile color.active_users (
int, optional) – Bot’s active users count.bot_verification_icon (
int, optional) – Identifier of the custom emoji used as a verification icon.send_paid_messages_stars (
int, optional) – Amount of stars required to send a paid message to this user.