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.
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 TypeMethodDescriptionvoidexecute(@NotNull ConversationContext context) Executes the conversation flow.
-
Method Details
-
execute
Executes the conversation flow.- Parameters:
context- the context of the currently running conversation
-