-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmain.py
More file actions
35 lines (27 loc) · 704 Bytes
/
main.py
File metadata and controls
35 lines (27 loc) · 704 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
import os
os.chdir(os.getcwd()+"\\box")
from box.utils.all import *
scripts.preload()
app = Client(
"box",
misc.api_id,
misc.api_hash,
misc.app_version,
misc.device_model,
misc.system_version,
misc.lang_code,
in_memory=True,
workdir = misc.data,
session_string=cfg.get("session_string")
)
async def main():
await loader.load(app)
misc.app = app
await app.start()
if not app.session_string:
cfg.write("session_string", await app.export_session_string())
print(f"{misc.userbot_name} {misc.app_version} running")
await idle()
await app.stop()
if __name__ == "__main__":
app.run(main())