Object
SilentSender

public class SilentSender extends Object
A silent sender that returns Optional objects upon execution. Mainly used to decrease verboseness of exception handling.
Author:
Abbas Abou Daya
  • Constructor Details

    • SilentSender

      public SilentSender(TelegramClient telegramClient)
  • Method Details

    • send

      public Optional<Message> send(String message, long id)
    • sendMd

      public Optional<Message> sendMd(String message, long id)
    • forceReply

      public Optional<Message> forceReply(String message, long id)
    • execute

      public <T extends Serializable, Method extends BotApiMethod<T>> Optional<T> execute(Method method)
    • executeAsync

      public <T extends Serializable, Method extends BotApiMethod<T>, Callback extends SentCallback<T>> void executeAsync(Method method, Callback callable)