Skip to content
This repository has been archived by the owner on Jul 9, 2024. It is now read-only.

Commit

Permalink
V
Browse files Browse the repository at this point in the history
  • Loading branch information
dishapatel010 authored Jul 9, 2024
1 parent 1df89d7 commit 7c9c0bb
Showing 1 changed file with 35 additions and 10 deletions.
45 changes: 35 additions & 10 deletions README.md
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.

0 comments on commit 7c9c0bb

Please sign in to comment.