All Implemented Interfaces:
Validable

public class SendMessage extends BotApiMethodMessage
Version:
1.0 Use this method to send text messages. On success, the sent Message is returned.
Author:
Ruben Bermudez
  • Field Details

  • Constructor Details

    • SendMessage

      public SendMessage()
  • Method Details

    • setChatId

      public void setChatId(@NonNull @NonNull Long chatId)
    • disableWebPagePreview

      public void disableWebPagePreview()
    • enableWebPagePreview

      public void enableWebPagePreview()
    • enableNotification

      public void enableNotification()
    • disableNotification

      public void disableNotification()
    • enableMarkdown

      public void enableMarkdown(boolean enable)
    • enableHtml

      public void enableHtml(boolean enable)
    • enableMarkdownV2

      public void enableMarkdownV2(boolean enable)
    • getMethod

      public String getMethod()
      Description copied from class: BotApiMethod
      Getter for method path (that is the same as method name)
      Specified by:
      getMethod in class BotApiMethod<Message>
      Returns:
      Method path
    • validate

      public void validate() throws TelegramApiValidationException
      Description copied from interface: Validable
      Validates that mandatory fields are filled and optional objects
      Throws:
      TelegramApiValidationException - If any mandatory field is empty