Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/stephancill/telegram-open-frame
https://github.com/stephancill/telegram-open-frame
Last synced: 13 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/stephancill/telegram-open-frame
- Owner: stephancill
- License: mit
- Created: 2024-05-20T21:21:22.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2024-05-20T21:44:48.000Z (6 months ago)
- Last Synced: 2024-05-21T00:08:51.744Z (6 months ago)
- Language: TypeScript
- Homepage: https://telegram-open-frames.vercel.app
- Size: 90.8 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Telegram Open Frames
This is a Telegram bot that lets you send and interact with Open Frames frames in a chat.
## Usage
1. Search for a frame inline by starting the message with `@OpenFramesBot `.
2. Select the frame you want to send.
3. The frame will be sent to the chat.## Limitations
- Text input not supported
- `mint` and `tx` actions are not supported
- Data URL images are not supported
- Frames have to be stored and retrieved from a kv store because button data is too large to be stored in a telegram button callback (limit is 64 bytes)## Development
1. Install dependencies
```
yarn install
```2. Copy `.env.sample` to `.env` and fill in the values
3. Start the KV store server
```
docker-compose up
```4. Start the bot
```
yarn dev
```5. Set the telegram webhook
```
curl -F "url=/telegram" https://api.telegram.org/bot/setWebhook
```6. Search for a frame inline by starting the message with `@ `.
## Telegram Open Frames
The proxy will send `clientProtocol: "*@*"` to the server with the intention that the server will serve a frame that does not require authentication. It only sends `buttonIndex` and `state` in `untrustedData`.
This may change in the future when telegram webhook requests are used as authentication somehow.