Interface ConversationExecutor

Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface ConversationExecutor
Represents an executor for a conversation.

Example usage:


 Conversation testConversation = Conversation.ofBuilder("test", context -> {
      String id = context.chat().id();
      SendMessage message = SendMessage.ofBuilder(id, "Test conversation").build();
      context.bot().execute(message);
 }).build();
 
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    execute(@NotNull ConversationContext context)
    Executes the conversation flow.
  • Method Details

    • execute

      void execute(@NotNull @NotNull ConversationContext context)
      Executes the conversation flow.
      Parameters:
      context - the context of the currently running conversation