Telethon
Telethon copied to clipboard
support new Telegram web apps
Particularly, a new type of button, which opens a web app. (bot API 6) Example: https://t.me/DurgerKingBot
For more info: https://core.telegram.org/bots/webapps
How I can to do a product menu as DurgerKingBot? DurgerKinBot is open source?
it is new in bot API 6. You can make similar interface with JavaScript
you can see an example here: https://github.com/revenkroz/telegram-web-app-bot-example
it is new in bot API 6. You can make similar interface with JavaScript
I can do a similar interface with a JS Framewors like Angular? and them implementing in Telegram?, excuse my ignorance, is that yesterday I saw DurgerKinBot video and I thought it was great
telegram has its own framework, I guess. (Have no experience with JS) Just look closely at the repository I mentioned in the last message
aiogram supports it btw
aiogram
Many thanks, for yours comments 👌
you can see an example here: https://github.com/revenkroz/telegram-web-app-bot-example
@arsikurin @fr20587 Thx, for simple example! Btw, I didnt understand from official docs two moments:
- Telegram WebApp- is it a common web app on Spring framework mb? Do you have any example of the Telegram WebApp, that you call in web_app.url button field?
- Where I need index.js with row
<script src="https://telegram.org/js/telegram-web-app.js"></script>
? I have my bot written with java8 & Spring 5, I dont have index.js file. - I dont see official Git repo with
@DurgerKingBot - https://t.me/durgerkingbot
project, do you have link? - I check your bot, in index.html see work logic via Telegram.WebApp. I have my bot on Java8/Spring5, how to copy your logic (Telegram.WebApp calls), to java code?
you can see an example here: https://github.com/revenkroz/telegram-web-app-bot-example
@arsikurin @fr20587 Thx, for simple example! Btw, I didnt understand from official docs two moments:
- Telegram WebApp- is it a common web app on Spring framework mb? Do you have any example of the Telegram WebApp, that you call in web_app.url button field?
- Where I need index.js with row
<script src="https://telegram.org/js/telegram-web-app.js"></script>
? I have my bot written with java8 & Spring 5, I dont have index.js file.- I dont see official Git repo with
@DurgerKingBot - https://t.me/durgerkingbot
project, do you have link?- I check your bot, in index.html see work logic via Telegram.WebApp. I have my bot on Java8/Spring5, how to copy your logic (Telegram.WebApp calls), to java code?
It isn't my bot, actually. You should add web_app url to any button. It will open like web view application. This is how it is done in aiogram: types.InlineKeyboardButton("button name", web_app=types.WebAppInfo(url="https://example.com"))
@arsikurin I undertood that, thx. The main point- do you have simple example of web app to call from web_app.url? Any framework- React/Angular/Spring Ui. I dont understand how to give answer to telegram bot and telegram itself, which calls web app by the button.
@arsikurin I undertood that, thx. The main point- do you have simple example of web app to call from web_app.url? Any framework- React/Angular/Spring Ui. I dont understand how to give answer to telegram bot and telegram itself, which calls web app by the button.
it is explained in official docs
Locking because it keeps getting offtopic comments. I'm leaving it open to track the implementation of this feature in the library, but the issues section is not for support on usage.
v1.25 available in PyPi offers the new buttons through raw API.