Changed applications.json options
This commit is contained in:
parent
c89072b80e
commit
de0df8f0f6
1
.gitignore
vendored
1
.gitignore
vendored
@ -160,3 +160,4 @@ users
|
||||
!users/.gitkeep
|
||||
TASK.md
|
||||
inline_bot.py
|
||||
data/applications.json
|
@ -1 +0,0 @@
|
||||
{}
|
9
main.py
9
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
|
||||
|
Reference in New Issue
Block a user