Skip to content

It is necessary to update the menu when new data comes from outside (fetch) #185

Answered by EdJoPaTo
efilatus asked this question in Q&A
Discussion options

You must be logged in to vote

I assume you are using something like choose or select. You can return a relative path where to go in the menu after a button is pressed.

The following example returns to the parent menu after pressing the button.

menuTemplate.choose('unique', ['walk', 'swim'], {
	async do(ctx, key) {
		await ctx.answerCallbackQuery(`Lets ${key}`)
		// You can also go back to the parent menu afterwards for some 'quick' interactions in submenus
		return '..'
	}
})

Does that already help?

Replies: 1 comment 16 replies

Comment options

You must be logged in to vote
16 replies
@efilatus
Comment options

@efilatus
Comment options

@EdJoPaTo
Comment options

@efilatus
Comment options

@EdJoPaTo
Comment options

Answer selected by efilatus
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants