Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 33 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ This is Telegram Files Store Bot by [@AbirHasan2005](https://github.com/AbirHasa
* `API_ID` - Get this from [@TeleORG_Bot](https://t.me/TeleORG_Bot)
* `API_HASH` - Get this from [@TeleORG_Bot](https://t.me/TeleORG_Bot)
* `BOT_TOKEN` - Get this from [@BotFather](https://t.me/BotFather)
* `BOT_USERNAME` - You Bot Username. *(Without [@])*
* `BOT_USERNAME` - Your Bot's Username. *(Without [@])*
* `DB_CHANNEL` - The Channel ID which will be used as Database
* `BOT_OWNER` - Bot Owner UserID
* `DATABASE_URL` - MongoDB Database URI for Saving UserID for Broadcast.
Expand All @@ -27,6 +27,37 @@ This is Telegram Files Store Bot by [@AbirHasan2005](https://github.com/AbirHasa
### Deploy Now:
[![Deploy](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy?template=https://github.com/AbirHasan2005/PyroFilesStoreBot)

#### HOW TO DEPLOY

###### 1. Using the above deploy button if deploying on Heroku.
- Click on it. Make sure you have all the creds ready.
- Enter them in the fields provided, click deploy and wait for `Build Successful` message
- Once it deploys successfully don't forget to **Turn on the Dyno** from `RESOURCES` tab.

###### 2. Manually deploying to Heroku (Import)
- Import the repo and edit the config.py file and enter your creds if you know where to.
- Heroku -> Create App -> Select it, goto `DEPLOY` tab and select GitHub and connect to your account by pressing the `LINK GITHUB ACCOUNT` button at the bottom.
- Search for and select the imported repo and click deploy. Also, don't forget to **Turn on Dyno** from `RESOURCES` tab once it deploys successfully.

###### 3. Manually on Heroku (Fork, for lazy people without creds)
- Fork this repo.
- Create app on heroku. Open it and select `DEPLOY` tab and connect your GitHub account.
- Search and select the imported repo and click deploy directly.
- The repo will be deployed with dummy values in the Environment Variables. Doesn't matter as long as you don't turn on the dyno.
- Whenever you are ready just edit the variables in `SETTINGS` -> `REVEAL CONFIG VARS`.
- Turn on the dyno in `RESOURCES` tab once you enter all creds correctly.

###### 4. VPS.
- Clone this repo with `git clone https://github.com/AbirHasan2005/PyroFilesStoreBot`
- Change into the cloned repo `cd PyroFilesStoreBot`
- Edit variables in config.py file with any text editor.(Remove dummy values and put your own). Vim: `vim config.py`
- Run this command to install the prerequisites:`pip3 install -r requirements.txt`
- Lastly, run `python3 bot.py`(Linux) or `python bot.py`(Windows) to start the bot.





### Support Group:
<a href="https://t.me/linux_repo"><img src="https://img.shields.io/badge/Telegram-Join%20Telegram%20Group-blue.svg?logo=telegram"></a>

Expand All @@ -42,4 +73,4 @@ This is Telegram Files Store Bot by [@AbirHasan2005](https://github.com/AbirHasa
</p>
<p align="left">
<a href="https://instagram.com/AbirHasan2005"><img src="https://img.shields.io/badge/Instagram-Follow%20on%20Instagram-important.svg?logo=instagram"></a>
</p>
</p>
20 changes: 10 additions & 10 deletions configs.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
import os

class Config(object):
API_ID = int(os.environ.get("API_ID"))
API_HASH = os.environ.get("API_HASH")
BOT_TOKEN = os.environ.get("BOT_TOKEN")
BOT_USERNAME = os.environ.get("BOT_USERNAME")
DB_CHANNEL = int(os.environ.get("DB_CHANNEL"))
BOT_OWNER = int(os.environ.get("BOT_OWNER"))
DATABASE_URL = os.environ.get("DATABASE_URL")
UPDATES_CHANNEL = int(os.environ.get("UPDATES_CHANNEL"))
LOG_CHANNEL = int(os.environ.get("LOG_CHANNEL"))
API_ID = int(os.getenv("API_ID", 12345))
API_HASH = os.getenv("API_HASH", 'abc123')
BOT_TOKEN = os.getenv("BOT_TOKEN", '142:adn4')
BOT_USERNAME = os.getenv("BOT_USERNAME", 'filerobot')
DB_CHANNEL = int(os.getenv("DB_CHANNEL", -100122))
BOT_OWNER = int(os.getenv("BOT_OWNER", 1024552))
DATABASE_URL = os.getenv("DATABASE_URL", 'srv+mongo')
UPDATES_CHANNEL = int(os.getenv("UPDATES_CHANNEL", -100321 ))
LOG_CHANNEL = int(os.getenv("LOG_CHANNEL", -100200))
ABOUT_BOT_TEXT = f"""
This is Permanent Files Store Bot!
Send me any file I will save it in my Database. Also works for channel. Add me to channel as Admin with Edit Permission, I will add Save Uploaded File in Channel & add Sharable Button Link.
Expand Down Expand Up @@ -43,4 +43,4 @@ class Config(object):
Hi, [{}](tg://user?id={})\n\nThis is Permanent **File Store Bot**.

Send me any file I will give you a permanent Sharable Link. I Support Channel Also! Check **About Bot** Button.
"""
"""