https://github.com/itz-ashlynn/tg-mediahost-bot
https://github.com/itz-ashlynn/tg-mediahost-bot
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/itz-ashlynn/tg-mediahost-bot
- Owner: Itz-Ashlynn
- License: mit
- Created: 2024-11-05T21:08:57.000Z (12 months ago)
- Default Branch: main
- Last Pushed: 2025-04-22T20:49:24.000Z (6 months ago)
- Last Synced: 2025-04-22T21:39:14.574Z (6 months ago)
- Language: JavaScript
- Homepage: https://t.me/AR_UrlUploaderBot
- Size: 8.3 MB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# TG-MediaHost-Bot
## TG-MediaHost-Bot Deployment on Cloudflare Workers
This repository contains code to deploy a TG-MediaHost-Bot on Cloudflare Workers using `worker.js`
# Prerequisites
- A Telegram bot token from @BotFather
- A Cloudflare account with Workers enabled1 Configuration
Set up your Telegram bot:
- Obtain your bot token from @BotFather.
- Set the TOKEN variable in `worker.js` with your bot's token.2 Chat ID:
- Replace CHAT_ID with the integer ID of your chat (if applicable).
- Set CHAT_ID to null if you don't want chat verification.3 Security:
Replace `SECRET` with a secure, unique string to protect your webhook.# Deployment Steps
- Go to the Cloudflare dashboard, navigate to Workers, and create a new Worker.
- Copy the code from worker.js and paste it into the Worker editor.# Deploy the Worker:
Save and deploy the Worker. Cloudflare will assign a URL to your Worker.
# Webhook Registration:
- Access `/registerWebhook` endpoint to register your Telegram webhook.
- Use `/unRegisterWebhook` to remove the webhook if needed.# Endpoints
- `/endpoint`: Main webhook endpoint for handling Telegram updates.
- `/registerWebhook`: Registers the bot's webhook with Telegram.
- `/unRegisterWebhook`: Unregisters the bot's webhook.## Credits
Made by [Ashlynn Repository](https://t.me/Ashlynn_Repository)If you find this project useful, please consider giving it a ⭐ on GitHub! Your support helps improve and maintain this repository. Forking the repo is also encouraged – feel free to customize and enhance the code to fit your own needs.