This repository has been archived by the owner on Jul 9, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1df89d7
commit 7c9c0bb
Showing
1 changed file
with
35 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,36 @@ | ||
# TGStory | ||
--- | ||
- Save and Deploy `story.js` to cf-worker | ||
- Create KV `IMAGES` | ||
- Bind to cf-worker as variable `IMAGES` | ||
- Create ENV var from cf-worker settings : | ||
- TOKEN : `BOT-TOKEN` | ||
- DOMAIN : `https://example.subdoamin.workers.dev/` | ||
- set webhook to cf-worker `https://api.telegram.org/botTOKEN/setWebhook?url=https://example.subdoamin.workers.dev/bot` make sure you are doing it to /bot | ||
- DONE! Send images to bot | ||
--- | ||
|
||
## Overview | ||
|
||
TGStory is a Telegram bot that allows users to share images & videos within chats using Mini Apps. | ||
|
||
## Setting Up a Mini App in BotFather | ||
|
||
1. **Create Bot:** | ||
- Start a chat with `@BotFather`. | ||
- Use `/newbot` and follow the prompts. | ||
|
||
2. **Configure Mini App:** | ||
- Create web app for bot: `/newapp` and follow the prompts. | ||
|
||
## Direct Links for Mini Apps | ||
|
||
- Open Mini App: `https://t.me/botusername/appname` | ||
- With `startapp` parameter: `https://t.me/botusername/appname?startapp=command` | ||
- With `startapp` and compact mode: `https://t.me/botusername/appname?startapp=command&mode=compact` | ||
|
||
## Deployment Instructions for TGStory | ||
|
||
1. **Deploy `story.js` to Cloudflare Worker.** | ||
2. **Create KV Namespace:** | ||
- Name it `IMAGES`. | ||
3. **Bind KV Namespace to Worker.** | ||
4. **Set Environment Variables:** | ||
- `TOKEN`: Your bot token. | ||
- `DOMAIN`: Worker URL, e.g., `https://example.subdomain.workers.dev/` | ||
5. **Set Webhook:** | ||
``` | ||
https://api.telegram.org/botTOKEN/setWebhook?url=https://example.subdomain.workers.dev/bot | ||
``` | ||
|
||
6. **Done!** Start sending images to the bot. |