Update app.py
Browse files
app.py
CHANGED
@@ -26,22 +26,21 @@ api_hash = str(api_hash)
|
|
26 |
bot_token = str(btoken)
|
27 |
channel= int(chnl)
|
28 |
|
|
|
|
|
29 |
|
30 |
###DB BACKUP##
|
31 |
|
32 |
def downdb(msgid):
|
33 |
-
os.remove('instance/database.db')
|
34 |
-
|
35 |
-
fast_download(client,msgid)
|
36 |
return '2'
|
37 |
|
38 |
|
39 |
-
def updb():
|
40 |
-
client = TelegramClient(None, api_id, api_hash)
|
41 |
-
client.start(bot_token=bot_token)
|
42 |
path = 'instance/database.db'
|
43 |
-
fle = fast_upload(client, file_location=path)
|
44 |
-
client.send_file(channel,fle, force_document=True)
|
45 |
return '2'
|
46 |
|
47 |
app = Flask("Simplz")
|
|
|
26 |
bot_token = str(btoken)
|
27 |
channel= int(chnl)
|
28 |
|
29 |
+
client = TelegramClient(None, api_id, api_hash)
|
30 |
+
await client.start(bot_token=bot_token)
|
31 |
|
32 |
###DB BACKUP##
|
33 |
|
34 |
def downdb(msgid):
|
35 |
+
os.remove('instance/database.db')
|
36 |
+
await fast_download(client,msgid)
|
|
|
37 |
return '2'
|
38 |
|
39 |
|
40 |
+
def updb():
|
|
|
|
|
41 |
path = 'instance/database.db'
|
42 |
+
fle = await fast_upload(client, file_location=path)
|
43 |
+
await client.send_file(channel,fle, force_document=True)
|
44 |
return '2'
|
45 |
|
46 |
app = Flask("Simplz")
|