@ Override public void handlePress ( CallbackQuery query ) { executeCallback ( ) ; if ( textCallback != null && inputGiven ) { inputGiven = false ; Conversation . builder ( query . getBotInstance ( ) ) . forWhom ( owner . getBaseMessage ( ) . getChat ( ) ) . silent ( true ) . prompts ( ) . last ( new TextPrompt ( ) { @ Override public boolean process ( ConversationContext context , TextContent input ) { textCallback . accept ( UserInputInlineMenuButton . this , input . getContent ( ) ) ; inputGiven = true ; return false ; } @ Override public SendableMessage promptMessage ( ConversationContext context ) { return null ; } } ) . build ( ) . begin ( ) ; } }
Initiates a conversation with the chat awaiting text input On input executes callback