java.lang.Object
io.github.yvasyliev.telegramforwarderbot.service.sender.UrlSender

@Service public class UrlSender extends Object
Service for sending URLs to a Telegram chat.
  • Constructor Details

    • UrlSender

      public UrlSender()
  • Method Details

    • sendUrl

      public org.telegram.telegrambots.meta.api.objects.message.Message sendUrl(URL url, String message) throws org.telegram.telegrambots.meta.exceptions.TelegramApiException
      Sends a message containing a URL to the admin chat.
      Parameters:
      url - the URL to send
      message - the message to accompany the URL
      Returns:
      the sent message
      Throws:
      org.telegram.telegrambots.meta.exceptions.TelegramApiException - if an error occurs while sending the message