Yakova commited on
Commit
bd57d1d
1 Parent(s): 6b868ed

Update src/app.py

Browse files
Files changed (1) hide show
  1. 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
- client = TelegramClient("stream_bot", 870972, "ce2efaca02dfcd110941be6025e9ac0d")
 
 
 
 
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="6298083270:AAGj9lo9Fpb52CKsOlFBs4ZYvxN7PjnnB98")
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)