How to implement pagination in telegram?

hi. im trying to integrate my rasa chatbot to telegram and i want to send a list of information but apply pagination since theyre kinda long. ive seen a tutorial here: python-telegram-bot-pagination · PyPI

but to my understanding, it seems to work as a standalone/ without any bot framework besides telebot, and cant call 2 instances of the bot at the same time (webhooks in rasa & telebot)

how do i implement pagination in telegram? how can i add those same functions from the example within thank you so much

If you want to use this library I’d suggest creating a custom channel which extracts the pagination inforrmation from a custom output payload.

It might also work to just use buttons? What exactly does the pagination do? So what happens if I e.g. click on << 3?

1 Like

hi! thank u so much for replying. still a little confused with the custom channels bit but still trying to learn it.

someone also suggested using button payloads. i could visualize how its gonna work but the main problem i have is how i can access the response made by the chatbot, and edit it accordingly

say for example i have a list of characters (like from the example in my post). i need the bot to reply with details of the first character only, along with buttons “prev” and “next”

so when u click on the next button, it supposedly edits the bot reply (containing details of the first character) to details of the 2nd character of the list

Clicking the button should in my opinion send a new user message which then triggers some sort of action which updates the slot value.