Spaces:
sahanind
/
No application file

sahanind commited on
Commit
9090980
·
verified ·
1 Parent(s): c6592cb

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -37,8 +37,8 @@ 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, limit=1):
41
- await fast_download(client,message)
42
 
43
  return '2'
44
 
 
37
  client = TelegramClient(None, api_id, api_hash)
38
  await client.start(bot_token=bot_token)
39
  os.remove('instance/database.db')
40
+ last_message = (await client.get_messages(chat, 1))[0]
41
+ await fast_download(client,last_message)
42
 
43
  return '2'
44