forked from botifyx-bots/File-store-Pro
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmain.py
More file actions
42 lines (35 loc) · 788 Bytes
/
Copy pathmain.py
File metadata and controls
42 lines (35 loc) · 788 Bytes
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
36
37
38
39
40
41
42
import asyncio
asyncio.set_event_loop(asyncio.new_event_loop())
from bot import Bot, web_app, run_flask
from pyrogram import compose
from config import *
from threading import Thread
# 🚀 Start Flask FIRST for Render health check
Thread(target=run_flask, daemon=True).start()
async def main():
app = []
app.append(
Bot(
SESSION,
WORKERS,
DB_CHANNEL,
FSUBS,
TOKEN,
ADMINS,
MESSAGES,
AUTO_DEL,
DB_URI,
DB_NAME,
API_ID,
API_HASH,
PROTECT,
DISABLE_BTN
)
)
await compose(app)
async def runner():
await asyncio.gather(
main(),
web_app()
)
asyncio.run(runner())