java.lang.Object
org.telegram.abilitybots.api.objects.Reply
Direct Known Subclasses:
ReplyFlow

public class Reply extends Object
A reply consists of update conditionals and an action to be applied on the update.

If an update satisfies the conditions set by the reply, then it's safe to Reply#actOn(Update).

Author:
Abbas Abou Daya
  • Field Details

    • conditions

      public final List<Predicate<org.telegram.telegrambots.meta.api.objects.Update>> conditions
    • action

      public final BiConsumer<BaseAbilityBot,org.telegram.telegrambots.meta.api.objects.Update> action
  • Method Details

    • of

      public static Reply of(BiConsumer<BaseAbilityBot,org.telegram.telegrambots.meta.api.objects.Update> action, List<Predicate<org.telegram.telegrambots.meta.api.objects.Update>> conditions)
    • of

      @SafeVarargs public static Reply of(BiConsumer<BaseAbilityBot,org.telegram.telegrambots.meta.api.objects.Update> action, Predicate<org.telegram.telegrambots.meta.api.objects.Update>... conditions)
    • isOkFor

      public boolean isOkFor(org.telegram.telegrambots.meta.api.objects.Update update)
    • actOn

      public void actOn(BaseAbilityBot bot, org.telegram.telegrambots.meta.api.objects.Update update)
    • conditions

      public List<Predicate<org.telegram.telegrambots.meta.api.objects.Update>> conditions()
    • action

      public BiConsumer<BaseAbilityBot,org.telegram.telegrambots.meta.api.objects.Update> action()
    • stream

      public Stream<Reply> stream()
    • enableStats

      public Reply enableStats(String name)
    • statsEnabled

      public boolean statsEnabled()
    • name

      public String name()
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object