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

    • SendGift

      public SendGift(Object chatId, String giftId, Api rs)
    • SendGift

      public SendGift(long userId, String giftId, Api rs)
  • Method Details

    • payForUpgrade

      public SendGift payForUpgrade(Boolean payForUpgrade)
      Optional
      Parameters:
      payForUpgrade - 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 textParseMode)
      Optional
      Parameters:
      textParseMode - Mode for parsing entities in the text.
      Returns:
      SendGift
    • textEntities

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