Spaces:
sahanind
/
No application file

sahanind commited on
Commit
7c774ff
·
verified ·
1 Parent(s): 86f45d6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -3
app.py CHANGED
@@ -33,11 +33,13 @@ channel= int(chnl)
33
 
34
  ###DB BACKUP##
35
 
36
- async def downdb(msgid):
37
  client = TelegramClient(None, api_id, api_hash)
38
  await client.start(bot_token=bot_token)
39
- os.remove('instance/database.db')
40
- await fast_download(client,msgid)
 
 
41
  return '2'
42
 
43
 
 
33
 
34
  ###DB BACKUP##
35
 
36
+ async def downdb():
37
  client = TelegramClient(None, api_id, api_hash)
38
  await client.start(bot_token=bot_token)
39
+ os.remove('instance/database.db')
40
+ async for message in client.iter_messages(channel_username, limit=1):
41
+ await fast_download(client,message)
42
+
43
  return '2'
44
 
45