Skip to content

Commit 3698e93

Browse files
authored
Updated By Codeflix Bots
1 parent 8d5fc3b commit 3698e93

12 files changed

+772
-0
lines changed

.gitignore

Lines changed: 140 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,140 @@
1+
### Python template
2+
# Byte-compiled / optimized / DLL files
3+
__pycache__/
4+
*.py[cod]
5+
*$py.class
6+
7+
# C extensions
8+
*.so
9+
10+
# Distribution / packaging
11+
.Python
12+
build/
13+
develop-eggs/
14+
dist/
15+
downloads/
16+
eggs/
17+
.eggs/
18+
lib/
19+
lib64/
20+
parts/
21+
sdist/
22+
var/
23+
wheels/
24+
share/python-wheels/
25+
*.egg-info/
26+
.installed.cfg
27+
*.egg
28+
MANIFEST
29+
30+
# PyInstaller
31+
# Usually these files are written by a python script from a template
32+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
33+
*.manifest
34+
*.spec
35+
36+
# Installer logs
37+
pip-log.txt
38+
pip-delete-this-directory.txt
39+
40+
# Unit test / coverage reports
41+
htmlcov/
42+
.tox/
43+
.nox/
44+
.coverage
45+
.coverage.*
46+
.cache
47+
nosetests.xml
48+
coverage.xml
49+
*.cover
50+
*.py,cover
51+
.hypothesis/
52+
.pytest_cache/
53+
cover/
54+
55+
# Translations
56+
*.mo
57+
*.pot
58+
59+
# Django stuff:
60+
*.log
61+
local_settings.py
62+
db.sqlite3
63+
db.sqlite3-journal
64+
65+
# Flask stuff:
66+
instance/
67+
.webassets-cache
68+
69+
# Scrapy stuff:
70+
.scrapy
71+
72+
# Sphinx documentation
73+
docs/_build/
74+
75+
# PyBuilder
76+
.pybuilder/
77+
target/
78+
79+
# Jupyter Notebook
80+
.ipynb_checkpoints
81+
82+
# IPython
83+
profile_default/
84+
ipython_config.py
85+
86+
# pyenv
87+
# For a library or package, you might want to ignore these files since the code is
88+
# intended to run in multiple environments; otherwise, check them in:
89+
# .python-version
90+
91+
# pipenv
92+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
93+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
94+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
95+
# install all needed dependencies.
96+
#Pipfile.lock
97+
98+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow
99+
__pypackages__/
100+
101+
# Celery stuff
102+
celerybeat-schedule
103+
celerybeat.pid
104+
105+
# SageMath parsed files
106+
*.sage.py
107+
108+
# Environments
109+
.env
110+
.venv
111+
env/
112+
venv/
113+
ENV/
114+
env.bak/
115+
venv.bak/
116+
117+
# Spyder project settings
118+
.spyderproject
119+
.spyproject
120+
121+
# Rope project settings
122+
.ropeproject
123+
124+
# mkdocs documentation
125+
/site
126+
127+
# mypy
128+
.mypy_cache/
129+
.dmypy.json
130+
dmypy.json
131+
132+
# Pyre type checker
133+
.pyre/
134+
135+
# pytype static type analyzer
136+
.pytype/
137+
138+
# Cython debug symbols
139+
cython_debug/
140+

Dockerfile

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
FROM python:3.10-slim
2+
WORKDIR /app
3+
4+
COPY requirements.txt requirements.txt
5+
RUN pip3 install -r requirements.txt
6+
7+
COPY . .
8+
9+
CMD python3 main.py

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2024 Codeflix-Bots
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

Procfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
worker: python3 main.py

README.md

Lines changed: 147 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,147 @@
1+
━━━━━━━━━━━━━━━━━━━━
2+
3+
<h2 align="center">
4+
──「 ғɪʟᴇ sᴛᴏʀᴇ ᴘʀᴏ 」──
5+
</h2>
6+
7+
<p align="center">
8+
<img src="https://graph.org/file/8581e33195ed8183a3253.jpg">
9+
</p>
10+
11+
12+
![Typing SVG](https://readme-typing-svg.herokuapp.com/?lines=FILE+SHARING+!;CREATED+BY+CODEFLIX+DEVELOPER!;A+ADVANCE+BOT+WITH+COOL+FEATURE!)
13+
</p>
14+
15+
━━━━━━━━━━━━━━━━━
16+
17+
18+
19+
<details><summary><b>ғᴇᴀᴛᴜʀᴇs:</b></summary>
20+
21+
• <b>Batch & Custom Batch Links:</b> Create links for one or multiple posts easily using <code>/batch</code> & <code>/custom_batch</code>
22+
• <b>Link Generator:</b> Instantly generate direct links with <code>/genlink</code>
23+
• <b>Broadcast Tools:</b> Send messages or media to all users using <code>/broadcast</code>, <code>/dbroadcast</code>, or <code>/pbroadcast</code>
24+
• <b>Auto File Deletion:</b> Control auto-delete with <code>/dlt_time</code> & <code>/check_dlt_time</code>
25+
• <b>User Management:</b> Ban/unban users and view banlist via <code>/ban</code>, <code>/unban</code>, and <code>/banlist</code>
26+
• <b>Multi Force Subscription:</b> Add, delete, and manage multiple Force Sub channels with <code>/addchnl</code>, <code>/delchnl</code>, <code>/listchnl</code>
27+
• <b>Admin Control:</b> Add or remove admins with <code>/add_admin</code>, <code>/deladmin</code>, and view list via <code>/admins</code>
28+
29+
• <b>Bot Analytics:</b> Get stats and uptime via <code>/stats</code>, user info with <code>/users</code>, and database count via <code>/count</code>
30+
• <b>Deployment Ready:</b> Easily deploy on <b>Heroku</b> or <b>Koyeb</b> in minutes
31+
32+
<b>✨ More features & enhancements coming soon...</b>
33+
</details>
34+
35+
36+
<details><summary><b> - ᴠᴀʀɪᴀʙʟᴇs :</b></summary>
37+
38+
## ᴠᴀʀɪᴀʙʟᴇs
39+
* `API_HASH` Your API Hash from my.telegram.org
40+
* `APP_ID` Your API ID from my.telegram.org
41+
* `TG_BOT_TOKEN` Your bot token from @BotFather
42+
* `OWNER_ID` Must enter Your Telegram Id
43+
* `CHANNEL_ID` Your Channel ID eg:- -100xxxxxxxx
44+
* `DATABASE_URL` Your mongo db url
45+
* `DATABASE_NAME` Your mongo db session name
46+
* `ADMINS` Optional: A space separated list of user_ids of Admins, they can only create links
47+
* `START_MESSAGE` Optional: start message of bot, use HTML and <a href='https://github.com/codeflix-bots/filestore/blob/master/README.md#start_message'>fillings</a>
48+
* `PROTECT_CONTENT` Optional: True if you need to prevent files from forwarding
49+
</details>
50+
51+
## 𝐶𝑜𝑚𝑚𝑎𝑛𝑑𝑠
52+
53+
```
54+
/start - start the bot or get posts
55+
/batch - create link for more than one posts
56+
/genlink - create link for one post
57+
/users - view bot statistics
58+
/broadcast - broadcast any messages to bot users
59+
/dbroadcast - broadcast any messages with auto delete.
60+
/stats - checking your bot uptime
61+
/start - start the bot or get posts
62+
/batch - create link for more than one posts
63+
/custom_batch - create custom batch from channel/group
64+
/genlink - create link for one post
65+
/users - view bot statistics
66+
/broadcast - broadcast any messages to bot users
67+
/dbroadcast - broadcast any messages with auto delete
68+
/stats - check your bot uptime
69+
/dlt_time - set auto delete time for files
70+
/check_dlt_time - check current delete time setting
71+
/ban - ban a user from using the bot
72+
/unban - unban a previously banned user
73+
/banlist - get list of banned users
74+
/addchnl - add a channel for force subscription
75+
/delchnl - remove a force subscribe channel
76+
/listchnl - view all added force subscribe channels
77+
/fsub_mode - toggle force subscribe on or off
78+
/pbroadcast - pin a broadcast to all user's chat
79+
/add_admin - add a new admin
80+
/deladmin - remove an admin
81+
/admins - list all current admins
82+
```
83+
84+
<img src="https://user-images.githubusercontent.com/73097560/115834477-dbab4500-a447-11eb-908a-139a6edaec5c.gif">
85+
86+
</b>⋗ ᴛᴇʟᴇɢʀᴀᴍ - <b>[ᴄᴏᴅᴇғʟɪx ʙᴏᴛs](https://t.me/codeflix_bots)</b>
87+
88+
<img src="https://user-images.githubusercontent.com/73097560/115834477-dbab4500-a447-11eb-908a-139a6edaec5c.gif">
89+
90+
91+
<details>
92+
<summary><h3>
93+
- <b> ᴅᴇᴘʟᴏʏᴍᴇɴᴛ ᴍᴇᴛʜᴏᴅs </b>
94+
</h3></summary>
95+
<h3 align="center">
96+
─「 ᴅᴇᴩʟᴏʏ ᴏɴ ʜᴇʀᴏᴋᴜ 」─
97+
</h3>
98+
99+
<p align="center"><a href="https://heroku.com/deploy?template=https://github.com/Codeflix-Bots/FileStore">
100+
<img src="https://www.herokucdn.com/deploy/button.svg" alt="Deploy On Heroku">
101+
</a></p>
102+
<h3 align="center">
103+
─「 ᴅᴇᴩʟᴏʏ ᴏɴ ᴋᴏʏᴇʙ 」─
104+
</h3>
105+
<p align="center"><a href="https://app.koyeb.com/deploy?type=git&repository=github.com/Codeflix-Bots/FileStore&branch=master&name=master">
106+
<img src="https://www.koyeb.com/static/images/deploy/button.svg" alt="Deploy On Koyeb">
107+
</a></p>
108+
<h3 align="center">
109+
─「 ᴅᴇᴩʟᴏʏ ᴏɴ ʀᴀɪʟᴡᴀʏ 」─
110+
</h3>
111+
<p align="center"><a href="https://railway.app/deploy?template=https://github.com/Codeflix-Bots/FileStore">
112+
<img height="45px" src="https://railway.app/button.svg">
113+
</a></p>
114+
<h3 align="center">
115+
─「 ᴅᴇᴩʟᴏʏ ᴏɴ ʀᴇɴᴅᴇʀ 」─
116+
</h3>
117+
<p align="center"><a href="https://render.com/deploy?repo=https://github.com/Codeflix-Bots/FileStore">
118+
<img src="https://render.com/images/deploy-to-render-button.svg" alt="Deploy to Render">
119+
</a></p>
120+
<h3 align="center">
121+
─「 ᴅᴇᴩʟᴏʏ ᴏɴ ᴠᴘs 」─
122+
</h3>
123+
<p>
124+
<pre>
125+
git clone https://github.com/Codeflix-Bots/FileStore
126+
# Install Packages
127+
pip3 install -U -r requirements.txt
128+
Edit info.py with variables as given below then run bot
129+
python3 bot.py
130+
</pre>
131+
</p>
132+
</details>
133+
134+
<h3>「 ᴄʀᴇᴅɪᴛs 」
135+
</h3>
136+
137+
- <b>[ᴄᴏᴅᴇғʟɪx ʙᴏᴛs](https://t.me/codeflix_bots)[ᴜᴘᴅᴀᴛᴇs](https://t.me/codeflix_bots) </b>
138+
- <b>[ʏᴀᴛᴏ](https://github.com/sewxiy)[sᴏᴍᴇᴛʜɪɴɢ](https://t.me/cosmic_freak) </b>
139+
- <b>[ʀᴏʜɪᴛ](https://github.com/rohit3607)[sᴏᴍᴇᴛʜɪɴɢ](https://t.me/FILE_SHARINGBOTS/17) </b>
140+
141+
<b>ᴀɴᴅ ᴀʟʟ [ᴛʜᴇ ᴄᴏɴᴛʀɪʙᴜᴛᴏʀs](https://telegram.me/codeflix-bots) ᴡʜᴏ ʜᴇʟᴩᴇᴅ ɪɴ ᴍᴀᴋɪɴɢ file store ʙᴏᴛ ᴜsᴇꜰᴜʟ & ᴩᴏᴡᴇʀꜰᴜʟ 🖤 </b>
142+
143+
## 📌 𝑵𝒐𝒕𝒆
144+
145+
ᴊᴜꜱᴛ ꜰᴏʀᴋ ᴛʜᴇ ʀᴇᴘᴏ ᴀɴᴅ ᴇᴅɪᴛ ᴀꜱ ᴘᴇʀ ʏᴏᴜʀ ɴᴇᴇᴅꜱ.
146+
147+
<img src="https://user-images.githubusercontent.com/73097560/115834477-dbab4500-a447-11eb-908a-139a6edaec5c.gif">

app.json

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
{
2+
"name": "TG File Share/Sharing Bot",
3+
"description": "file sharing bot store posts and it can access by special links",
4+
"keywords": [
5+
"telegram",
6+
"file",
7+
"sharing"
8+
],
9+
"repository": "https://github.com/Codeflix-Bots/FileStore",
10+
"logo": "https://graph.org/file/6ceef6a98b82b0e0e2f03.jpg",
11+
"env": {
12+
"TG_BOT_TOKEN": {
13+
"description": "Your Bot token, Get it from @Botfather",
14+
"value": ""
15+
},
16+
"OWNER_ID": {
17+
"description": "An integer of consisting of your owner ID",
18+
"value": "6497757690"
19+
},
20+
"APP_ID":{
21+
"description": "your app id, take it from my.telegram.org",
22+
"value": ""
23+
},
24+
"DATABASE_URL": {
25+
"description": "Paste your mongo db url",
26+
"value": "url"
27+
},
28+
"DATABASE_NAME":{
29+
"description": "Enter your DATABASE_NAME ",
30+
"value": "Cluster0"
31+
},
32+
"API_HASH":{
33+
"description": "your api hash, take it from my.telegram.org",
34+
"value": ""
35+
},
36+
"CHANNEL_ID":{
37+
"description": "make a channel (database channel), then make the bot as admin in channel, and it's id",
38+
"value": "-1001995978690"
39+
},
40+
"FORCE_SUB_CHANNEL":{
41+
"description": "id of the channel or group, if you want enable force sub feature else put 0",
42+
"value": "-1001473043276"
43+
},
44+
"FORCE_SUB_CHANNEL2":{
45+
"description": "id of the channel or group, if you want enable force sub feature else put 0",
46+
"value": "-1001495022147"
47+
},
48+
"ADMINS": {
49+
"description": "A space separated list of user_ids of Admins, they can only create links",
50+
"value": "5115691197 6273945163 6103092779 5231212075",
51+
"required": false
52+
},
53+
"PROTECT_CONTENT": {
54+
"description": "Protect contents from getting forwarded",
55+
"value": "False",
56+
"required": false
57+
}
58+
},
59+
"buildpacks": [
60+
{
61+
"url": "heroku/python"
62+
}
63+
],
64+
"formation": {
65+
"worker": {
66+
"quantity": 1,
67+
"size": "eco"
68+
}
69+
}
70+
}

0 commit comments

Comments
 (0)