Spaces:
Runtime error
Runtime error
Update src/app.py
Browse files- src/app.py +6 -2
src/app.py
CHANGED
@@ -7,7 +7,11 @@ from src.Classes.Hander import Handler
|
|
7 |
import os
|
8 |
|
9 |
routes = web.RouteTableDef()
|
10 |
-
|
|
|
|
|
|
|
|
|
11 |
|
12 |
|
13 |
@routes.get(r"/")
|
@@ -39,7 +43,7 @@ async def handle_get_request(req: web.Request) -> web.Response:
|
|
39 |
|
40 |
async def main():
|
41 |
port = int(os.environ.get("PORT", "7860"))
|
42 |
-
await client.start(bot_token=
|
43 |
server = web.Application()
|
44 |
server.add_routes(routes)
|
45 |
runner = web.AppRunner(server)
|
|
|
7 |
import os
|
8 |
|
9 |
routes = web.RouteTableDef()
|
10 |
+
API_ID=os.environ.get("API_ID")
|
11 |
+
API_HASH=os.environ.get("API_HASH")
|
12 |
+
BOT_TOKEN=os.environ.get("BOT_TOKEN")
|
13 |
+
|
14 |
+
client = TelegramClient("stream_bot", API_ID, API_HASH)
|
15 |
|
16 |
|
17 |
@routes.get(r"/")
|
|
|
43 |
|
44 |
async def main():
|
45 |
port = int(os.environ.get("PORT", "7860"))
|
46 |
+
await client.start(bot_token=BOT_TOKEN)
|
47 |
server = web.Application()
|
48 |
server.add_routes(routes)
|
49 |
runner = web.AppRunner(server)
|