Here is a detailed README.md
for your Telegram bot project. This will help users understand what the project is, how to set it up, and how to use it.
# GoFile Uploader Telegram Bot
A Telegram bot that uploads files and media to [gofile.io](https://gofile.io). This bot is built using Pyrogram and is designed to handle media and document uploads from Telegram and store them on gofile.io.
## Features
- Upload files to gofile.io via Telegram
- Supports direct URL uploads
- Optionally specify token and folder ID for uploads
- Provides direct download link from gofile.io
## Requirements
- Python 3.7+
- A Telegram bot token from [BotFather](https://core.telegram.org/bots#6-botfather)
- gofile.io account (optional for token and folder ID)
## Setup
### Clone the Repository
```bash
git clone https://github.com/yourusername/gofile-uploader-telegram-bot.git
cd gofile-uploader-telegram-bot
It's a good practice to use a virtual environment to manage dependencies.
python -m venv venv
source venv/bin/activate # On Windows use `venv\Scripts\activate`
pip install -r requirements.txt
Create a .env
file in the root of your project and add your bot token, API ID, and API hash. Optionally, specify the port.
BOT_TOKEN=your_telegram_bot_token_here
API_ID=your_api_id_here
API_HASH=your_api_hash_here
PORT=5000 # Optional
You can run the bot locally using the following command:
python main.py
- Sign up on Render.
- Create a New Web Service:
- Select GitHub as your repository source.
- Choose your repository and branch.
- Add the required environment variables (
BOT_TOKEN
,API_ID
,API_HASH
) in the Render dashboard. - Click "Deploy".
Once the bot is running, you can use the following commands in Telegram:
/start
: Get instructions on how to use the bot./upload
: Upload a file or media. You can use this command in several ways:- Reply to a media message with
/upload
to upload the media. - Use
/upload url
to upload a file from a URL. - Use
/upload token
to upload a file with a token. - Use
/upload token folderId
to upload a file with a token and folder ID.
- Reply to a media message with
.
├── .gitignore
├── Procfile
├── README.md
├── gofile.py
├── main.py
├── requirements.txt
├── .env # Not included in Git
This project is licensed under the MIT License. See the LICENSE file for details.
Contributions are welcome! Please open an issue or submit a pull request for any improvements or bug fixes.
If you have any questions or feedback, feel free to reach out on Telegram.
Make sure to replace placeholder values like `your_telegram_bot_token_here`, `your_api_id_here`, `your_api_hash_here`, `yourusername`, and the contact link with your actual details. This `README.md` provides a comprehensive guide for users to understand, set up, and use your Telegram bot.