File size: 1,442 Bytes
60e9648
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
---
title: File Store Bot
emoji: ๐Ÿ“‚
colorFrom: yellow
colorTo: green
sdk: gradio
sdk_version: 5.0.0
app_file: app.py
pinned: false
---

# File Store Bot ๐Ÿ“‚

Welcome to the **File Store Bot** repository. This bot is configured to run 24/7 on Hugging Face Spaces using Docker.

## Setup Instructions

### Environment Variables
Configure the following secrets in your Hugging Face Space settings under the **Variables and secrets** section:

1. **`API_ID`**: Your Telegram API ID.
2. **`API_HASH`**: Your Telegram API Hash.
3. **`BOT_TOKEN`**: The bot token from `@BotFather`.
4. **`OWNER_ID`**: Your Telegram User ID (owner of the bot).
5. **`ADMINS`**: Space-separated list of Telegram User IDs who can administer the bot (e.g. `1234567 8901234`).
6. **`DB_URI`**: MongoDB connection string (e.g., `mongodb+srv://...`).
7. **`DB_NAME`**: MongoDB database name (default: `FileStoreBot`).
8. **`DB_CHANNEL`**: Telegram channel ID where the files are stored (include the `-100` prefix).

## Features
- **Dynamic File Storage**: Store files in database channels and access them using short links.
- **Force Subscription (FSub)**: Users must join specified channel(s) before retrieving files.
- **Beautiful Dashboard**: A premium, live web status page showing resource usage (CPU/RAM/storage) and environment details.
- **Aiohttp Web Server**: Seamless 24/7 uptime using an embedded server bound to Hugging Face Space's expected port (`7860`).