Mbonea commited on
Commit
67e2e69
1 Parent(s): b927c12

I added the following

Browse files
Files changed (3) hide show
  1. App/Worker.py +4 -1
  2. App/__init__.py +2 -7
  3. requirements.txt +2 -1
App/Worker.py CHANGED
@@ -94,7 +94,10 @@ async def cleanup_temp_directory(
94
  ):
95
  try:
96
  print("sending...")
97
- await bot.send_file(chat_id, file=output_dir, caption="Your video caption")
 
 
 
98
  except Exception as e:
99
  print(e)
100
  finally:
 
94
  ):
95
  try:
96
  print("sending...")
97
+ await bot.send_video(
98
+ chat_id=chat_id, caption="Your Video Caption", file_name=output_dir
99
+ )
100
+ # await bot.send_file(chat_id, file=output_dir, caption="Your video caption")
101
  except Exception as e:
102
  print(e)
103
  finally:
App/__init__.py CHANGED
@@ -1,11 +1,6 @@
1
- from telethon import TelegramClient
2
- from telethon.sessions import StringSession
3
  import os
4
 
5
  TELEGRAM_SESSION = os.environ.get("TELEGRAM_SESSION")
6
 
7
- bot: TelegramClient = TelegramClient(
8
- StringSession(TELEGRAM_SESSION),
9
- api_id=870972,
10
- api_hash="ce2efaca02dfcd110941be6025e9ac0d",
11
- )
 
1
+ from pyrogram import Client
 
2
  import os
3
 
4
  TELEGRAM_SESSION = os.environ.get("TELEGRAM_SESSION")
5
 
6
+ bot: Client = Client("mboneabot", session_string=TELEGRAM_SESSION, workdir="/srv")
 
 
 
 
requirements.txt CHANGED
@@ -11,7 +11,8 @@ uvicorn==0.21.1
11
  gunicorn
12
  requests
13
  celery
14
- telethon
 
15
  git+https://github.com/redis/redis-py.git
16
  asgiref
17
  pipx
 
11
  gunicorn
12
  requests
13
  celery
14
+ pyrogram
15
+ TgCrypto
16
  git+https://github.com/redis/redis-py.git
17
  asgiref
18
  pipx