Class SendBuilder<T,R>

java.lang.Object
io.github.natanimn.telebof.requests.AbstractBaseRequest<T,R>
io.github.natanimn.telebof.requests.send.SendBuilder<T,R>
Direct Known Subclasses:
SendAnimation, SendAudio, SendContact, SendDice, SendDocument, SendGame, SendInvoice, SendMediaGroup, SendMessage, SendPhoto, SendSticker, SendVenue, SendVideo, SendVideoNote, SendVoice

public abstract class SendBuilder<T,R> extends AbstractBaseRequest<T,R>
Common parameters builder for sendXyz methods
Since:
3 March 2025
  • Constructor Details

  • Method Details

    • messageThreadId

      public T messageThreadId(int messageThreadId)
      Optional
      Parameters:
      messageThreadId - Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
      Returns:
      SendBuilder
    • parseMode

      public T parseMode(ParseMode parseMode)
      Optional
      Parameters:
      parseMode - Mode for parsing entities in the message text.
      Returns:
      SendBuilder
    • disableWebPagePreview

      public T disableWebPagePreview(boolean disableWebPagePreview)
    • disableNotification

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

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

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

      public T 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:
      SendBuilder
    • businessConnectionId

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

      public T messageEffectId(String messageEffectId)
      Optional
      Parameters:
      messageEffectId - Unique identifier of the message effect to be added to the message; for private chats only
      Returns:
      SendBuilder
    • allowPaidBroadcast

      public T allowPaidBroadcast(boolean allowPaidBroadcast)
      Optional
      Parameters:
      allowPaidBroadcast - Pass True to allow up to 1000 messages per second, ignoring broadcasting limits for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance
      Returns:
      SendBuilder
    • directMessagesTopicId

      public T 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:
      SendBuilder
    • suggestedPostParameters

      public T 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:
      SendBuilder