nmlorg / metabot

Modularized, multi-account bot.
https://metabot.readthedocs.io/
5 stars 0 forks source link

Use static Web Apps to implement custom UI elements #92

Open nmlorg opened 2 years ago

nmlorg commented 2 years ago

For things like time zone selection and editing free-form text (like new-user greetings), it might make sense to use a one-off Web App to render the UI instead of trying to do everything as a Message.

I'm thinking the UI would include a web_app keyboard button that loads static HTML off nmlorg.github.io, somehow encoding the field's current data in initData; uses JS to get the user's time zone (or offers a richer UI for selection than can be implemented in Telegram), puts the current text in an editable control (versus requiring the user to manually copy, paste, and then edit), etc.; then sends the new value to the bot using sendData.

nmlorg commented 2 months ago

I've been holding off because, creeping up on 2 years now, Telegram X still does not support Web Apps (now called Mini Apps). However, I really need to move on with this to get started on a lot of other stuff — most notably #32.