diff --git a/.gitignore b/.gitignore index c575d2b..90e4a84 100644 --- a/.gitignore +++ b/.gitignore @@ -159,4 +159,5 @@ config.json users !users/.gitkeep TASK.md -inline_bot.py \ No newline at end of file +inline_bot.py +data/applications.json \ No newline at end of file diff --git a/data/applications.json b/data/applications.json deleted file mode 100644 index 9e26dfe..0000000 --- a/data/applications.json +++ /dev/null @@ -1 +0,0 @@ -{} \ No newline at end of file diff --git a/main.py b/main.py index f7c0977..faf39cc 100644 --- a/main.py +++ b/main.py @@ -20,6 +20,15 @@ pid = getpid() app = Client("holochecker", bot_token=configGet("bot_token", "bot"), api_id=configGet("api_id", "bot"), api_hash=configGet("api_hash", "bot")) +for entry in [f"{configGet('data', 'locations')}{sep}applications.json"]: + mode = 'r' if path.exists(entry) else 'w' + with open(entry, mode) as f: + try: + f.write("{}") + except: + pass + + async def isAnAdmin(admin_id): if admin_id == configGet("owner") or admin_id in configGet("admins"): return True