Skip to content
Back to top
View this page

# User

class telegram.User(id, first_name, is_bot, last_name=None, username=None, language_code=None, can_join_groups=None, can_read_all_group_messages=None, supports_inline_queries=None, is_premium=None, added_to_attachment_menu=None, can_connect_to_business=None, has_main_web_app=None, *, api_kwargs=None)

  Bases: `telegram.TelegramObject`

  This object represents a Telegram user or bot.

  Objects of this class are comparable in terms of equality. Two objects of this class are considered equal, if their `id` is equal.

  Available In

  - `telegram.AffiliateInfo.affiliate_user`

  - `telegram.Bot.bot`

  - `telegram.BusinessConnection.user`

  - `telegram.CallbackQuery.from_user`

  - `telegram.ChatBoostSourceGiftCode.user`

  - `telegram.ChatBoostSourceGiveaway.user`

  - `telegram.ChatBoostSourcePremium.user`

  - `telegram.ChatInviteLink.creator`

  - `telegram.ChatJoinRequest.from_user`

  - `telegram.ChatMember.user`

  - `telegram.ChatMemberAdministrator.user`

  - `telegram.ChatMemberBanned.user`

  - `telegram.ChatMemberLeft.user`

  - `telegram.ChatMemberMember.user`

  - `telegram.ChatMemberOwner.user`

  - `telegram.ChatMemberRestricted.user`

  - `telegram.ChatMemberUpdated.from_user`

  - `telegram.ChecklistTask.completed_by_user`

  - `telegram.ChosenInlineResult.from_user`

  - `telegram.DirectMessagesTopic.user`

  - `telegram.GameHighScore.user`

  - `telegram.GiveawayWinners.winners`

  - `telegram.InlineQuery.from_user`

  - `telegram.Message.from_user`

  - `telegram.Message.left_chat_member`

  - `telegram.Message.new_chat_members`

  - `telegram.Message.sender_business_bot`

  - `telegram.Message.via_bot`

  - `telegram.MessageEntity.user`

  - `telegram.MessageOriginUser.sender_user`

  - `telegram.MessageReactionUpdated.user`

  - `telegram.OwnedGiftRegular.sender_user`

  - `telegram.OwnedGiftUnique.sender_user`

  - `telegram.PaidMediaPurchased.from_user`

  - `telegram.PollAnswer.user`

  - `telegram.PreCheckoutQuery.from_user`

  - `telegram.ProximityAlertTriggered.traveler`

  - `telegram.ProximityAlertTriggered.watcher`

  - `telegram.ShippingQuery.from_user`

  - `telegram.TransactionPartnerAffiliateProgram.sponsor_user`

  - `telegram.TransactionPartnerUser.user`

  - `telegram.Update.effective_sender`

  - `telegram.Update.effective_user`

  - `telegram.VideoChatParticipantsInvited.users`

  Returned In

  `telegram.Bot.get_me()`

  Changed in version 20.0: The following are now keyword-only arguments in Bot methods: `location`, `filename`, `venue`, `contact`, `{read, write, connect, pool}_timeout` `api_kwargs`. Use a named argument for those, and notice that some positional arguments changed position as a result.

  Parameters:

    - id (`int`) – Unique identifier for this user or bot.

    - is_bot (`bool`) – `True`, if this user is a bot.

    - first_name (`str`) – User’s or bot’s first name.

    - last_name (`str`, optional) – User’s or bot’s last name.

    - username (`str`, optional) – User’s or bot’s username.

    - language_code (`str`, optional) – IETF language tag of the user’s language.

    - can_join_groups (`str`, optional) – `True`, if the bot can be invited to groups. Returned only in `telegram.Bot.get_me()`.

    - can_read_all_group_messages (`str`, optional) – `True`, if privacy mode is disabled for the bot. Returned only in `telegram.Bot.get_me()`.

    - supports_inline_queries (`str`, optional) – `True`, if the bot supports inline queries. Returned only in `telegram.Bot.get_me()`.

    - is_premium (`bool`, optional) –

      `True`, if this user is a Telegram Premium user.

      Added in version 20.0.

    - added_to_attachment_menu (`bool`, optional) –

      `True`, if this user added the bot to the attachment menu.

      Added in version 20.0.

    - can_connect_to_business (`bool`, optional) –

      `True`, if the bot can be connected to a Telegram Business account to receive its messages. Returned only in `telegram.Bot.get_me()`.

      Added in version 21.1.

    - has_main_web_app (`bool`, optional) –

      `True`, if the bot has the main Web App. Returned only in `telegram.Bot.get_me()`.

      Added in version 21.5.

  id

    Unique identifier for this user or bot.

    Type:

      `int`

  is_bot

    `True`, if this user is a bot.

    Type:

      `bool`

  first_name

    User’s or bot’s first name.

    Type:

      `str`

  last_name

    Optional. User’s or bot’s last name.

    Type:

      `str`

  username

    Optional. User’s or bot’s username.

    Type:

      `str`

  language_code

    Optional. IETF language tag of the user’s language.

    Type:

      `str`

  can_join_groups

    Optional. `True`, if the bot can be invited to groups. Returned only in `telegram.Bot.get_me` requests.

    Type:

      `str`

  can_read_all_group_messages

    Optional. `True`, if privacy mode is disabled for the bot. Returned only in `telegram.Bot.get_me` requests.

    Type:

      `str`

  supports_inline_queries

    Optional. `True`, if the bot supports inline queries. Returned only in `telegram.Bot.get_me` requests.

    Type:

      `str`

  is_premium

    Optional. `True`, if this user is a Telegram Premium user.

    Added in version 20.0.

    Type:

      `bool`

  added_to_attachment_menu

    Optional. `True`, if this user added the bot to the attachment menu.

    Added in version 20.0.

    Type:

      `bool`

  can_connect_to_business

    Optional. `True`, if the bot can be connected to a Telegram Business account to receive its messages. Returned only in `telegram.Bot.get_me()`.

    Added in version 21.1.

    Type:

      `bool`

  has_main_web_app

    Returned only in `telegram.Bot.get_me()`.

    Added in version 21.5.

    Type:

      `bool`

  async approve_join_request(chat_id, *, read_timeout=None, write_timeout=None, connect_timeout=None, pool_timeout=None, api_kwargs=None)

    Shortcut for:

        await bot.approve_chat_join_request(user_id=update.effective_user.id, *args, **kwargs)

    For the documentation of the arguments, please see `telegram.Bot.approve_chat_join_request()`.

    Note

    This shortcuts build on the assumption that `User.id` coincides with the `Chat.id` of the private chat with the user. This has been the case so far, but Telegram does not guarantee that this stays this way.

    Added in version 13.8.

    Returns:

      On success, `True` is returned.

    Return type:

      `bool`

  async copy_message(chat_id, message_id, caption=None, parse_mode=None, caption_entities=None, disable_notification=None, reply_markup=None, protect_content=None, message_thread_id=None, reply_parameters=None, show_caption_above_media=None, allow_paid_broadcast=None, video_start_timestamp=None, direct_messages_topic_id=None, suggested_post_parameters=None, *, reply_to_message_id=None, allow_sending_without_reply=None, read_timeout=None, write_timeout=None, connect_timeout=None, pool_timeout=None, api_kwargs=None)

    Shortcut for:

        await bot.copy_message(from_chat_id=update.effective_user.id, *args, **kwargs)

    For the documentation of the arguments, please see `telegram.Bot.copy_message()`.

    Note

    This shortcuts build on the assumption that `User.id` coincides with the `Chat.id` of the private chat with the user. This has been the case so far, but Telegram does not guarantee that this stays this way.

    Returns:

      On success, returns the MessageId of the sent message.

    Return type:

      `telegram.MessageId`

  async copy_messages(chat_id, message_ids, disable_notification=None, protect_content=None, message_thread_id=None, remove_caption=None, direct_messages_topic_id=None, *, read_timeout=None, write_timeout=None, connect_timeout=None, pool_timeout=None, api_kwargs=None)

    Shortcut for:

        await bot.copy_messages(from_chat_id=update.effective_user.id, *argss, **kwargs)

    For the documentation of the arguments, please see `telegram.Bot.copy_messages()`.

    See also

    `copy_message()`, `send_copy()`, `send_copies()`.

    Added in version 20.8.

    Returns:

      On success, a tuple of `MessageId` of the sent messages is returned.

    Return type:

      tuple[`telegram.MessageId`]

  async decline_join_request(chat_id, *, read_timeout=None, write_timeout=None, connect_timeout=None, pool_timeout=None, api_kwargs=None)

    Shortcut for:

        await bot.decline_chat_join_request(user_id=update.effective_user.id, *args, **kwargs)

    For the documentation of the arguments, please see `telegram.Bot.decline_chat_join_request()`.

    Note

    This shortcuts build on the assumption that `User.id` coincides with the `Chat.id` of the private chat with the user. This has been the case so far, but Telegram does not guarantee that this stays this way.

    Added in version 13.8.

    Returns:

      On success, `True` is returned.

    Return type:

      `bool`

  async delete_message(message_id, *, read_timeout=None, write_timeout=None, connect_timeout=None, pool_timeout=None, api_kwargs=None)

    Shortcut for:

        await bot.delete_message(update.effective_user.id, *argss, **kwargs)

    For the documentation of the arguments, please see `telegram.Bot.delete_message()`.

    Added in version 20.8.

    Returns:

      On success, `True` is returned.

    Return type:

      `bool`

  async delete_messages(message_ids, *, read_timeout=None, write_timeout=None, connect_timeout=None, pool_timeout=None, api_kwargs=None)

    Shortcut for:

        await bot.delete_messages(update.effective_user.id, *argss, **kwargs)

    For the documentation of the arguments, please see `telegram.Bot.delete_messages()`.

    Added in version 20.8.

    Returns:

      On success, `True` is returned.

    Return type:

      `bool`

  async forward_from(from_chat_id, message_id, disable_notification=None, protect_content=None, message_thread_id=None, video_start_timestamp=None, direct_messages_topic_id=None, suggested_post_parameters=None, *, read_timeout=None, write_timeout=None, connect_timeout=None, pool_timeout=None, api_kwargs=None)

    Shortcut for:

        await bot.forward_message(chat_id=update.effective_user.id, *argss, **kwargs)

    For the documentation of the arguments, please see `telegram.Bot.forward_message()`.

    See also

    `forward_to()`, `forward_messages_from()`, `forward_messages_to()`

    Added in version 20.0.

    Returns:

      On success, instance representing the message posted.

    Return type:

      `telegram.Message`

  async forward_messages_from(from_chat_id, message_ids, disable_notification=None, protect_content=None, message_thread_id=None, direct_messages_topic_id=None, *, read_timeout=None, write_timeout=None, connect_timeout=None, pool_timeout=None, api_kwargs=None)

    Shortcut for:

        await bot.forward_messages(chat_id=update.effective_user.id, *argss, **kwargs)

    For the documentation of the arguments, please see `telegram.Bot.forward_messages()`.

    See also

    `forward_to()`, `forward_from()`, `forward_messages_to()`.

    Added in version 20.8.

    Returns:

      On success, a tuple of `MessageId` of sent messages is returned.

    Return type:

      tuple[`telegram.MessageId`]

  async forward_messages_to(chat_id, message_ids, disable_notification=None, protect_content=None, message_thread_id=None, direct_messages_topic_id=None, *, read_timeout=None, write_timeout=None, connect_timeout=None, pool_timeout=None, api_kwargs=None)

    Shortcut for:

        await bot.forward_messages(from_chat_id=update.effective_user.id, *argss, **kwargs)

    For the documentation of the arguments, please see `telegram.Bot.forward_messages()`.

    See also

    `forward_from()`, `forward_to()`, `forward_messages_from()`.

    Added in version 20.8.

    Returns:

      On success, a tuple of `MessageId` of sent messages is returned.

    Return type:

      tuple[`telegram.MessageId`]

  async forward_to(chat_id, message_id, disable_notification=None, protect_content=None, message_thread_id=None, video_start_timestamp=None, direct_messages_topic_id=None, suggested_post_parameters=None, *, read_timeout=None, write_timeout=None, connect_timeout=None, pool_timeout=None, api_kwargs=None)

    Shortcut for:

        await bot.forward_message(from_chat_id=update.effective_user.id, *argss, **kwargs)

    For the documentation of the arguments, please see `telegram.Bot.forward_message()`.

    See also

    `forward_from()`, `forward_messages_from()`, `forward_messages_to()`

    Added in version 20.0.

    Returns:

      On success, instance representing the message posted.

    Return type:

      `telegram.Message`

  property full_name

    Convenience property. The user’s `first_name`, followed by (if available) `last_name`.

    Type:

      `str`

  async get_chat_boosts(chat_id, *, read_timeout=None, write_timeout=None, connect_timeout=None, pool_timeout=None, api_kwargs=None)

    Shortcut for:

        await bot.get_user_chat_boosts(user_id=update.effective_user.id, *args, **kwargs)

    For the documentation of the arguments, please see `telegram.Bot.get_user_chat_boosts()`.

    Added in version 20.8.

    Returns:

      On success, returns the boosts applied by the user.

    Return type:

      `telegram.UserChatBoosts`

  async get_menu_button(*, read_timeout=None, write_timeout=None, connect_timeout=None, pool_timeout=None, api_kwargs=None)

    Shortcut for:

        await bot.get_chat_menu_button(chat_id=update.effective_user.id, *args, **kwargs)

    For the documentation of the arguments, please see `telegram.Bot.get_chat_menu_button()`.

    See also

    `set_menu_button()`

    Note

    This shortcuts build on the assumption that `User.id` coincides with the `Chat.id` of the private chat with the user. This has been the case so far, but Telegram does not guarantee that this stays this way.

    Added in version 20.0.

    Returns:

      On success, the current menu button is returned.

    Return type:

      `telegram.MenuButton`

  async get_profile_photos(offset=None, limit=None, *, read_timeout=None, write_timeout=None, connect_timeout=None, pool_timeout=None, api_kwargs=None)

    Shortcut for:

        await bot.get_user_profile_photos(update.effective_user.id, *args, **kwargs)

    For the documentation of the arguments, please see `telegram.Bot.get_user_profile_photos()`.

    Returns:

      `telegram.UserProfilePhotos`

  async gift_premium_subscription(month_count, star_count, text=None, text_parse_mode=None, text_entities=None, *, read_timeout=None, write_timeout=None, connect_timeout=None, pool_timeout=None, api_kwargs=None)

    Shortcut for:

        await bot.gift_premium_subscription(user_id=update.effective_user.id, *args, **kwargs)

    For the documentation of the arguments, please see `telegram.Bot.gift_premium_subscription()`.

    Added in version 22.1.

    Returns:

      On success, `True` is returned.

    Return type:

      `bool`

  property link

    Convenience property. If `username` is available, returns a t.me link of the user.

    Type:

      `str`

  mention_button(name=None)

    Shortcut for:

        InlineKeyboardButton(text=name, url=f"tg://user?id={update.effective_user.id}")

    Added in version 13.9.

    Parameters:

      name (`str`) – The name used as a link for the user. Defaults to `full_name`.

    Returns:

      InlineButton with url set to the user mention

    Return type:

      `telegram.InlineKeyboardButton`

  mention_html(name=None)
    Parameters:

      name (`str`) – The name used as a link for the user. Defaults to `full_name`.

    Returns:

      The inline mention for the user as HTML.

    Return type:

      `str`

  mention_markdown(name=None)

    Note

    `'Markdown'` is a legacy mode, retained by Telegram for backward compatibility. You should use `mention_markdown_v2()` instead.

    Parameters:

      name (`str`) – The name used as a link for the user. Defaults to `full_name`.

    Returns:

      The inline mention for the user as markdown (version 1).

    Return type:

      `str`

  mention_markdown_v2(name=None)
    Parameters:

      name (`str`) – The name used as a link for the user. Defaults to `full_name`.

    Returns:

      The inline mention for the user as markdown (version 2).

    Return type:

      `str`

  property name

    Convenience property. If available, returns the user’s `username` prefixed with “@”. If `username` is not available, returns `full_name`.

    Type:

      `str`

  async pin_message(message_id, disable_notification=None, business_connection_id=None, *, read_timeout=None, write_timeout=None, connect_timeout=None, pool_timeout=None, api_kwargs=None)

    Shortcut for:

        await bot.pin_chat_message(chat_id=update.effective_user.id, *args, **kwargs)

    For the documentation of the arguments, please see `telegram.Bot.pin_chat_message()`.

    Note

    This shortcuts build on the assumption that `User.id` coincides with the `Chat.id` of the private chat with the user. This has been the case so far, but Telegram does not guarantee that this stays this way.

    Returns:

      On success, `True` is returned.

    Return type:

      `bool`

  async refund_star_payment(telegram_payment_charge_id, *, read_timeout=None, write_timeout=None, connect_timeout=None, pool_timeout=None, api_kwargs=None)

    Shortcut for:

        await bot.refund_star_payment(user_id=update.effective_user.id, *args, **kwargs)

    For the documentation of the arguments, please see `telegram.Bot.refund_star_payment()`.

    Added in version 21.3.

    Returns:

      On success, `True` is returned.

    Return type:

      `bool`

  async remove_verification(*, read_timeout=None, write_timeout=None, connect_timeout=None, pool_timeout=None, api_kwargs=None)

    Shortcut for:

        await bot.remove_user_verification(user_id=update.effective_user.id, *args, **kwargs)

    For the documentation of the arguments, please see `telegram.Bot.remove_user_verification()`.

    Added in version 21.10.

    Returns:

      On success, `True` is returned.

    Return type:

      `bool`

  async send_action(action, message_thread_id=None, business_connection_id=None, *, read_timeout=None, write_timeout=None, connect_timeout=None, pool_timeout=None, api_kwargs=None)

    Alias for `send_chat_action`

  async send_animation(animation, duration=None, width=None, height=None, caption=None, parse_mode=None, disable_notification=None, reply_markup=None, caption_entities=None, protect_content=None, message_thread_id=None, has_spoiler=None, thumbnail=None, reply_parameters=None, business_connection_id=None, message_effect_id=None, allow_paid_broadcast=None, show_caption_above_media=None, direct_messages_topic_id=None, suggested_post_parameters=None, *, reply_to_message_id=None, allow_sending_without_reply=None, filename=None, read_timeout=None, write_timeout=None, connect_timeout=None, pool_timeout=None, api_kwargs=None)

    Shortcut for:

        await bot.send_animation(update.effective_user.id, *args, **kwargs)

    For the documentation of the arguments, please see `telegram.Bot.send_animation()`.

    Note

    This shortcuts build on the assumption that `User.id` coincides with the `Chat.id` of the private chat with the user. This has been the case so far, but Telegram does not guarantee that this stays this way.

    Returns:

      On success, instance representing the message posted.

    Return type:

      `telegram.Message`

  async send_audio(audio, duration=None, performer=None, title=None, caption=None, disable_notification=None, reply_markup=None, parse_mode=None, caption_entities=None, protect_content=None, message_thread_id=None, thumbnail=None, reply_parameters=None, business_connection_id=None, message_effect_id=None, allow_paid_broadcast=None, direct_messages_topic_id=None, suggested_post_parameters=None, *, reply_to_message_id=None, allow_sending_without_reply=None, filename=None, read_timeout=None, write_timeout=None, connect_timeout=None, pool_timeout=None, api_kwargs=None)

    Shortcut for:

        await bot.send_audio(update.effective_user.id, *args, **kwargs)

    For the documentation of the arguments, please see `telegram.Bot.send_audio()`.

    Note

    This shortcuts build on the assumption that `User.id` coincides with the `Chat.id` of the private chat with the user. This has been the case so far, but Telegram does not guarantee that this stays this way.

    Returns:

      On success, instance representing the message posted.

    Return type:

      `telegram.Message`

  async send_chat_action(action, message_thread_id=None, business_connection_id=None, *, read_timeout=None, write_timeout=None, connect_timeout=None, pool_timeout=None, api_kwargs=None)

    Shortcut for:

        await bot.send_chat_action(update.effective_user.id, *args, **kwargs)

    For the documentation of the arguments, please see `telegram.Bot.send_chat_action()`.

    Note

    This shortcuts build on the assumption that `User.id` coincides with the `Chat.id` of the private chat with the user. This has been the case so far, but Telegram does not guarantee that this stays this way.

    Returns:

      On success.

    Return type:

      `True`

  async send_contact(phone_number=None, first_name=None, last_name=None, disable_notification=None, reply_markup=None, vcard=None, protect_content=None, message_thread_id=None, reply_parameters=None, business_connection_id=None, message_effect_id=None, allow_paid_broadcast=None, direct_messages_topic_id=None, suggested_post_parameters=None, *, reply_to_message_id=None, allow_sending_without_reply=None, contact=None, read_timeout=None, write_timeout=None, connect_timeout=None, pool_timeout=None, api_kwargs=None)

    Shortcut for:

        await bot.send_contact(update.effective_user.id, *args, **kwargs)

    For the documentation of the arguments, please see `telegram.Bot.send_contact()`.

    Note

    This shortcuts build on the assumption that `User.id` coincides with the `Chat.id` of the private chat with the user. This has been the case so far, but Telegram does not guarantee that this stays this way.

    Returns:

      On success, instance representing the message posted.

    Return type:

      `telegram.Message`

  async send_copies(from_chat_id, message_ids, disable_notification=None, protect_content=None, message_thread_id=None, remove_caption=None, direct_messages_topic_id=None, *, read_timeout=None, write_timeout=None, connect_timeout=None, pool_timeout=None, api_kwargs=None)

    Shortcut for:

        await bot.copy_messages(chat_id=update.effective_user.id, *argss, **kwargs)

    For the documentation of the arguments, please see `telegram.Bot.copy_messages()`.

    See also

    `copy_message()`, `send_copy()`, `copy_messages()`.

    Added in version 20.8.

    Returns:

      On success, a tuple of `MessageId` of the sent messages is returned.

    Return type:

      tuple[`telegram.MessageId`]

  async send_copy(from_chat_id, message_id, caption=None, parse_mode=None, caption_entities=None, disable_notification=None, reply_markup=None, protect_content=None, message_thread_id=None, reply_parameters=None, show_caption_above_media=None, allow_paid_broadcast=None, video_start_timestamp=None, direct_messages_topic_id=None, suggested_post_parameters=None, *, reply_to_message_id=None, allow_sending_without_reply=None, read_timeout=None, write_timeout=None, connect_timeout=None, pool_timeout=None, api_kwargs=None)

    Shortcut for:

        await bot.copy_message(chat_id=update.effective_user.id, *args, **kwargs)

    For the documentation of the arguments, please see `telegram.Bot.copy_message()`.

    Note

    This shortcuts build on the assumption that `User.id` coincides with the `Chat.id` of the private chat with the user. This has been the case so far, but Telegram does not guarantee that this stays this way.

    Returns:

      On success, instance representing the message posted.

    Return type:

      `telegram.Message`

  async send_dice(disable_notification=None, reply_markup=None, emoji=None, protect_content=None, message_thread_id=None, reply_parameters=None, business_connection_id=None, message_effect_id=None, allow_paid_broadcast=None, direct_messages_topic_id=None, suggested_post_parameters=None, *, reply_to_message_id=None, allow_sending_without_reply=None, read_timeout=None, write_timeout=None, connect_timeout=None, pool_timeout=None, api_kwargs=None)

    Shortcut for:

        await bot.send_dice(update.effective_user.id, *args, **kwargs)

    For the documentation of the arguments, please see `telegram.Bot.send_dice()`.

    Note

    This shortcuts build on the assumption that `User.id` coincides with the `Chat.id` of the private chat with the user. This has been the case so far, but Telegram does not guarantee that this stays this way.

    Returns:

      On success, instance representing the message posted.

    Return type:

      `telegram.Message`

  async send_document(document, caption=None, disable_notification=None, reply_markup=None, parse_mode=None, disable_content_type_detection=None, caption_entities=None, protect_content=None, message_thread_id=None, thumbnail=None, reply_parameters=None, business_connection_id=None, message_effect_id=None, allow_paid_broadcast=None, direct_messages_topic_id=None, suggested_post_parameters=None, *, reply_to_message_id=None, allow_sending_without_reply=None, filename=None, read_timeout=None, write_timeout=None, connect_timeout=None, pool_timeout=None, api_kwargs=None)

    Shortcut for:

        await bot.send_document(update.effective_user.id, *args, **kwargs)

    For the documentation of the arguments, please see `telegram.Bot.send_document()`.

    Note

    This shortcuts build on the assumption that `User.id` coincides with the `Chat.id` of the private chat with the user. This has been the case so far, but Telegram does not guarantee that this stays this way.

    Returns:

      On success, instance representing the message posted.

    Return type:

      `telegram.Message`

  async send_game(game_short_name, disable_notification=None, reply_markup=None, protect_content=None, message_thread_id=None, reply_parameters=None, business_connection_id=None, message_effect_id=None, allow_paid_broadcast=None, *, reply_to_message_id=None, allow_sending_without_reply=None, read_timeout=None, write_timeout=None, connect_timeout=None, pool_timeout=None, api_kwargs=None)

    Shortcut for:

        await bot.send_game(update.effective_user.id, *args, **kwargs)

    For the documentation of the arguments, please see `telegram.Bot.send_game()`.

    Note

    This shortcuts build on the assumption that `User.id` coincides with the `Chat.id` of the private chat with the user. This has been the case so far, but Telegram does not guarantee that this stays this way.

    Returns:

      On success, instance representing the message posted.

    Return type:

      `telegram.Message`

  async send_gift(gift_id, text=None, text_parse_mode=None, text_entities=None, pay_for_upgrade=None, *, read_timeout=None, write_timeout=None, connect_timeout=None, pool_timeout=None, api_kwargs=None)

    Shortcut for:

        await bot.send_gift(user_id=update.effective_user.id, *args, **kwargs )

    For the documentation of the arguments, please see `telegram.Bot.send_gift()`.

    Added in version 21.8.

    Returns:

      On success, `True` is returned.

    Return type:

      `bool`

  async send_invoice(title, description, payload, currency, prices, provider_token=None, start_parameter=None, photo_url=None, photo_size=None, photo_width=None, photo_height=None, need_name=None, need_phone_number=None, need_email=None, need_shipping_address=None, is_flexible=None, disable_notification=None, reply_markup=None, provider_data=None, send_phone_number_to_provider=None, send_email_to_provider=None, max_tip_amount=None, suggested_tip_amounts=None, protect_content=None, message_thread_id=None, reply_parameters=None, message_effect_id=None, allow_paid_broadcast=None, direct_messages_topic_id=None, suggested_post_parameters=None, *, reply_to_message_id=None, allow_sending_without_reply=None, read_timeout=None, write_timeout=None, connect_timeout=None, pool_timeout=None, api_kwargs=None)

    Shortcut for:

        await bot.send_invoice(update.effective_user.id, *args, **kwargs)

    For the documentation of the arguments, please see `telegram.Bot.send_invoice()`.

    Warning

    As of API 5.2 `start_parameter` is an optional argument and therefore the order of the arguments had to be changed. Use keyword arguments to make sure that the arguments are passed correctly.

    Note

    This shortcuts build on the assumption that `User.id` coincides with the `Chat.id` of the private chat with the user. This has been the case so far, but Telegram does not guarantee that this stays this way.

    Changed in version 13.5: As of Bot API 5.2, the parameter `start_parameter` is optional.

    Returns:

      On success, instance representing the message posted.

    Return type:

      `telegram.Message`

  async send_location(latitude=None, longitude=None, disable_notification=None, reply_markup=None, live_period=None, horizontal_accuracy=None, heading=None, proximity_alert_radius=None, protect_content=None, message_thread_id=None, reply_parameters=None, business_connection_id=None, message_effect_id=None, allow_paid_broadcast=None, direct_messages_topic_id=None, suggested_post_parameters=None, *, reply_to_message_id=None, allow_sending_without_reply=None, location=None, read_timeout=None, write_timeout=None, connect_timeout=None, pool_timeout=None, api_kwargs=None)

    Shortcut for:

        await bot.send_location(update.effective_user.id, *args, **kwargs)

    For the documentation of the arguments, please see `telegram.Bot.send_location()`.

    Note

    This shortcuts build on the assumption that `User.id` coincides with the `Chat.id` of the private chat with the user. This has been the case so far, but Telegram does not guarantee that this stays this way.

    Returns:

      On success, instance representing the message posted.

    Return type:

      `telegram.Message`

  async send_media_group(media, disable_notification=None, protect_content=None, message_thread_id=None, reply_parameters=None, business_connection_id=None, message_effect_id=None, allow_paid_broadcast=None, direct_messages_topic_id=None, *, reply_to_message_id=None, allow_sending_without_reply=None, read_timeout=None, write_timeout=None, connect_timeout=None, pool_timeout=None, api_kwargs=None, caption=None, parse_mode=None, caption_entities=None)

    Shortcut for:

        await bot.send_media_group(update.effective_user.id, *args, **kwargs)

    For the documentation of the arguments, please see `telegram.Bot.send_media_group()`.

    Note

    This shortcuts build on the assumption that `User.id` coincides with the `Chat.id` of the private chat with the user. This has been the case so far, but Telegram does not guarantee that this stays this way.

    Returns:

      ] On success, a tuple of `Message` instances that were sent is returned.

    Return type:

      tuple[`telegram.Message`

  async send_message(text, parse_mode=None, disable_notification=None, reply_markup=None, entities=None, protect_content=None, message_thread_id=None, link_preview_options=None, reply_parameters=None, business_connection_id=None, message_effect_id=None, allow_paid_broadcast=None, direct_messages_topic_id=None, suggested_post_parameters=None, *, reply_to_message_id=None, disable_web_page_preview=None, allow_sending_without_reply=None, read_timeout=None, write_timeout=None, connect_timeout=None, pool_timeout=None, api_kwargs=None)

    Shortcut for:

        await bot.send_message(update.effective_user.id, *args, **kwargs)

    For the documentation of the arguments, please see `telegram.Bot.send_message()`.

    Note

    This shortcuts build on the assumption that `User.id` coincides with the `Chat.id` of the private chat with the user. This has been the case so far, but Telegram does not guarantee that this stays this way.

    Returns:

      On success, instance representing the message posted.

    Return type:

      `telegram.Message`

  async send_photo(photo, caption=None, disable_notification=None, reply_markup=None, parse_mode=None, caption_entities=None, protect_content=None, message_thread_id=None, has_spoiler=None, reply_parameters=None, business_connection_id=None, message_effect_id=None, allow_paid_broadcast=None, show_caption_above_media=None, direct_messages_topic_id=None, suggested_post_parameters=None, *, reply_to_message_id=None, allow_sending_without_reply=None, filename=None, read_timeout=None, write_timeout=None, connect_timeout=None, pool_timeout=None, api_kwargs=None)

    Shortcut for:

        await bot.send_photo(update.effective_user.id, *args, **kwargs)

    For the documentation of the arguments, please see `telegram.Bot.send_photo()`.

    Note

    This shortcuts build on the assumption that `User.id` coincides with the `Chat.id` of the private chat with the user. This has been the case so far, but Telegram does not guarantee that this stays this way.

    Returns:

      On success, instance representing the message posted.

    Return type:

      `telegram.Message`

  async send_poll(question, options, is_anonymous=None, type=None, allows_multiple_answers=None, correct_option_id=None, is_closed=None, disable_notification=None, reply_markup=None, explanation=None, explanation_parse_mode=None, open_period=None, close_date=None, explanation_entities=None, protect_content=None, message_thread_id=None, reply_parameters=None, business_connection_id=None, question_parse_mode=None, question_entities=None, message_effect_id=None, allow_paid_broadcast=None, *, reply_to_message_id=None, allow_sending_without_reply=None, read_timeout=None, write_timeout=None, connect_timeout=None, pool_timeout=None, api_kwargs=None)

    Shortcut for:

        await bot.send_poll(update.effective_user.id, *args, **kwargs)

    For the documentation of the arguments, please see `telegram.Bot.send_poll()`.

    Note

    This shortcuts build on the assumption that `User.id` coincides with the `Chat.id` of the private chat with the user. This has been the case so far, but Telegram does not guarantee that this stays this way.

    Returns:

      On success, instance representing the message posted.

    Return type:

      `telegram.Message`

  async send_sticker(sticker, disable_notification=None, reply_markup=None, protect_content=None, message_thread_id=None, emoji=None, reply_parameters=None, business_connection_id=None, message_effect_id=None, allow_paid_broadcast=None, direct_messages_topic_id=None, suggested_post_parameters=None, *, reply_to_message_id=None, allow_sending_without_reply=None, read_timeout=None, write_timeout=None, connect_timeout=None, pool_timeout=None, api_kwargs=None)

    Shortcut for:

        await bot.send_sticker(update.effective_user.id, *args, **kwargs)

    For the documentation of the arguments, please see `telegram.Bot.send_sticker()`.

    Note

    This shortcuts build on the assumption that `User.id` coincides with the `Chat.id` of the private chat with the user. This has been the case so far, but Telegram does not guarantee that this stays this way.

    Returns:

      On success, instance representing the message posted.

    Return type:

      `telegram.Message`

  async send_venue(latitude=None, longitude=None, title=None, address=None, foursquare_id=None, disable_notification=None, reply_markup=None, foursquare_type=None, google_place_id=None, google_place_type=None, protect_content=None, message_thread_id=None, reply_parameters=None, business_connection_id=None, message_effect_id=None, allow_paid_broadcast=None, direct_messages_topic_id=None, suggested_post_parameters=None, *, reply_to_message_id=None, allow_sending_without_reply=None, venue=None, read_timeout=None, write_timeout=None, connect_timeout=None, pool_timeout=None, api_kwargs=None)

    Shortcut for:

        await bot.send_venue(update.effective_user.id, *args, **kwargs)

    For the documentation of the arguments, please see `telegram.Bot.send_venue()`.

    Note

    This shortcuts build on the assumption that `User.id` coincides with the `Chat.id` of the private chat with the user. This has been the case so far, but Telegram does not guarantee that this stays this way.

    Returns:

      On success, instance representing the message posted.

    Return type:

      `telegram.Message`

  async send_video(video, duration=None, caption=None, disable_notification=None, reply_markup=None, width=None, height=None, parse_mode=None, supports_streaming=None, caption_entities=None, protect_content=None, message_thread_id=None, has_spoiler=None, thumbnail=None, reply_parameters=None, business_connection_id=None, message_effect_id=None, allow_paid_broadcast=None, show_caption_above_media=None, cover=None, start_timestamp=None, direct_messages_topic_id=None, suggested_post_parameters=None, *, reply_to_message_id=None, allow_sending_without_reply=None, filename=None, read_timeout=None, write_timeout=None, connect_timeout=None, pool_timeout=None, api_kwargs=None)

    Shortcut for:

        await bot.send_video(update.effective_user.id, *args, **kwargs)

    For the documentation of the arguments, please see `telegram.Bot.send_video()`.

    Note

    This shortcuts build on the assumption that `User.id` coincides with the `Chat.id` of the private chat with the user. This has been the case so far, but Telegram does not guarantee that this stays this way.

    Returns:

      On success, instance representing the message posted.

    Return type:

      `telegram.Message`

  async send_video_note(video_note, duration=None, length=None, disable_notification=None, reply_markup=None, protect_content=None, message_thread_id=None, thumbnail=None, reply_parameters=None, business_connection_id=None, message_effect_id=None, allow_paid_broadcast=None, direct_messages_topic_id=None, suggested_post_parameters=None, *, reply_to_message_id=None, allow_sending_without_reply=None, filename=None, read_timeout=None, write_timeout=None, connect_timeout=None, pool_timeout=None, api_kwargs=None)

    Shortcut for:

        await bot.send_video_note(update.effective_user.id, *args, **kwargs)

    For the documentation of the arguments, please see `telegram.Bot.send_video_note()`.

    Note

    This shortcuts build on the assumption that `User.id` coincides with the `Chat.id` of the private chat with the user. This has been the case so far, but Telegram does not guarantee that this stays this way.

    Returns:

      On success, instance representing the message posted.

    Return type:

      `telegram.Message`

  async send_voice(voice, duration=None, caption=None, disable_notification=None, reply_markup=None, parse_mode=None, caption_entities=None, protect_content=None, message_thread_id=None, reply_parameters=None, business_connection_id=None, message_effect_id=None, allow_paid_broadcast=None, direct_messages_topic_id=None, suggested_post_parameters=None, *, reply_to_message_id=None, allow_sending_without_reply=None, filename=None, read_timeout=None, write_timeout=None, connect_timeout=None, pool_timeout=None, api_kwargs=None)

    Shortcut for:

        await bot.send_voice(update.effective_user.id, *args, **kwargs)

    For the documentation of the arguments, please see `telegram.Bot.send_voice()`.

    Note

    This shortcuts build on the assumption that `User.id` coincides with the `Chat.id` of the private chat with the user. This has been the case so far, but Telegram does not guarantee that this stays this way.

    Returns:

      On success, instance representing the message posted.

    Return type:

      `telegram.Message`

  async set_menu_button(menu_button=None, *, read_timeout=None, write_timeout=None, connect_timeout=None, pool_timeout=None, api_kwargs=None)

    Shortcut for:

        await bot.set_chat_menu_button(chat_id=update.effective_user.id, *argss, **kwargs)

    For the documentation of the arguments, please see `telegram.Bot.set_chat_menu_button()`.

    See also

    `get_menu_button()`

    Note

    This shortcuts build on the assumption that `User.id` coincides with the `Chat.id` of the private chat with the user. This has been the case so far, but Telegram does not guarantee that this stays this way.

    Added in version 20.0.

    Returns:

      On success, `True` is returned.

    Return type:

      `bool`

  async unpin_all_messages(*, read_timeout=None, write_timeout=None, connect_timeout=None, pool_timeout=None, api_kwargs=None)

    Shortcut for:

        await bot.unpin_all_chat_messages(chat_id=update.effective_user.id, *args, **kwargs)

    For the documentation of the arguments, please see `telegram.Bot.unpin_all_chat_messages()`.

    Note

    This shortcuts build on the assumption that `User.id` coincides with the `Chat.id` of the private chat with the user. This has been the case so far, but Telegram does not guarantee that this stays this way.

    Returns:

      On success, `True` is returned.

    Return type:

      `bool`

  async unpin_message(message_id=None, business_connection_id=None, *, read_timeout=None, write_timeout=None, connect_timeout=None, pool_timeout=None, api_kwargs=None)

    Shortcut for:

        await bot.unpin_chat_message(chat_id=update.effective_user.id, *args, **kwargs)

    For the documentation of the arguments, please see `telegram.Bot.unpin_chat_message()`.

    Note

    This shortcuts build on the assumption that `User.id` coincides with the `Chat.id` of the private chat with the user. This has been the case so far, but Telegram does not guarantee that this stays this way.

    Returns:

      On success, `True` is returned.

    Return type:

      `bool`

  async verify(custom_description=None, *, read_timeout=None, write_timeout=None, connect_timeout=None, pool_timeout=None, api_kwargs=None)

    Shortcut for:

        await bot.verify_user(user_id=update.effective_user.id, *args, **kwargs)

    For the documentation of the arguments, please see `telegram.Bot.verify_user()`.

    Added in version 21.10.

    Returns:

      On success, `True` is returned.

    Return type:

      `bool`