Class SendGift


public class SendGift extends AbstractBaseRequest<SendGift,Boolean>
SendGift class for sending gifts
Since:
July 25, 2025
  • Constructor Details

    • SendGift

      public SendGift(Object chat_id, String gift_id, Api rs)
    • SendGift

      public SendGift(long user_id, String gift_id, Api rs)
  • Method Details

    • payForUpgrade

      public SendGift payForUpgrade(Boolean pay_for_upgrade)
      Optional
      Parameters:
      pay_for_upgrade - Pass True to pay for the gift upgrade from the bot's balance, thereby making the upgrade free for the receiver.
      Returns:
      SendGift
    • text

      public SendGift text(String text)
      Optional
      Parameters:
      text - Text that will be shown along with the gift; 0-128 characters
      Returns:
      SendGift
    • textParseMode

      public SendGift textParseMode(ParseMode text_parse_mode)
      Optional
      Parameters:
      text_parse_mode - Mode for parsing entities in the text.
      Returns:
      SendGift
    • textEntities

      public SendGift textEntities(List<MessageEntity> text_entities)
      Optional
      Parameters:
      text_entities - A list of MessageEntity, special entities that appear in the gift text. It can be specified instead of text_parse_mode
      Returns:
      SendGift