Class SendPaidMedia


public class SendPaidMedia extends AbstractBaseRequest<SendPaidMedia,Message>
SendPaidMedia class. Returns Message on success.
Since:
3 March 2025
See Also:
  • Constructor Details

    • SendPaidMedia

      public SendPaidMedia(Object chatId, int starCount, InputPaidMedia[] media, Api api)
      Required
      Parameters:
      chatId - chat id
      starCount - star count
      media - input media
      api - api
  • Method Details

    • caption

      public SendPaidMedia caption(String caption)
      Optional
      Parameters:
      caption - Media caption, 0-1024 characters after entities parsing
      Returns:
      SendPaidMedia
    • captionEntities

      public SendPaidMedia captionEntities(MessageEntity[] captionEntities)
      Optional
      Parameters:
      captionEntities - A JSON-serialized list of special entities that appear in the caption, which can be specified instead of parse_mode
      Returns:
      SendPaidMedia
    • parseMode

      public SendPaidMedia parseMode(ParseMode parseMode)
      Optional
      Parameters:
      parseMode - Mode for parsing entities in the media caption.
      Returns:
      SendPaidMedia
    • disableNotification

      public SendPaidMedia disableNotification(boolean disableNotification)
      Optional
      Parameters:
      disableNotification - Sends the message silently. Users will receive a notification with no sound.
      Returns:
      SendPaidMedia
    • protectContent

      public SendPaidMedia protectContent(boolean protectContent)
      Optional
      Parameters:
      protectContent - Protects the contents of the sent message from forwarding and saving
      Returns:
      SendPaidMedia
    • replyParameters

      public SendPaidMedia replyParameters(ReplyParameters replyParameters)
      Optional
      Parameters:
      replyParameters - Description of the message to reply to
      Returns:
      SendPaidMedia
    • replyMarkup

      public SendPaidMedia replyMarkup(Markup replyMarkup)
      Optional
      Parameters:
      replyMarkup - Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user
      Returns:
      SendPaidMedia
    • showCaptionAboveMedia

      public SendPaidMedia showCaptionAboveMedia(boolean showCaptionAboveMedia)
      Optional
      Parameters:
      showCaptionAboveMedia - Pass True, if the caption must be shown above the message media
      Returns:
      SendPaidMedia
    • businessConnectionId

      public SendPaidMedia businessConnectionId(String businessConnectionId)
      Optional
      Parameters:
      businessConnectionId - Unique identifier of the business connection on behalf of which the message will be sent
      Returns:
      SendPaidMedia
    • payload

      public SendPaidMedia payload(String payload)
      Optional
      Parameters:
      payload - Bot-defined paid media payload, 0-128 bytes. This will not be displayed to the user, use it for your internal processes.
      Returns:
      SendPaidMedia
    • directMessagesTopicId

      public SendPaidMedia directMessagesTopicId(int directMessagesTopicId)
      Optional
      Parameters:
      directMessagesTopicId - Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat
      Returns:
      SendPaidMedia
    • suggestedPostParameters

      public SendPaidMedia suggestedPostParameters(SuggestedPostParameters suggestedPostParameters)
      Optional
      Parameters:
      suggestedPostParameters - A JSON-serialized object containing the parameters of the suggested post to send; for direct messages chats only. If the message is sent as a reply to another suggested post, then that suggested post is automatically declined.
      Returns:
      SendPaidMedia