Compare commits
No commits in common. "2924c808dd9c2b344add9225924c1d9ffac0e485" and "9d0b66371ad53e65f204a9d1f14a6725f5dd9356" have entirely different histories.
2924c808dd
...
9d0b66371a
@ -45,7 +45,6 @@
|
||||
},
|
||||
"commands": {
|
||||
"rules": "Check out the rules",
|
||||
"nearby": "Show users near the area",
|
||||
"reapply": "Resubmit the application",
|
||||
"sponsorship": "Apply for sponsor role"
|
||||
},
|
||||
@ -66,7 +65,6 @@
|
||||
"applications": "Retrieve all applications as a JSON"
|
||||
},
|
||||
"commands_group_destination": {
|
||||
"warn": "Warn a user",
|
||||
"nearby": "Show users near the area"
|
||||
"warn": "Warn a user"
|
||||
}
|
||||
}
|
@ -23,7 +23,6 @@ async def cmd_application(app, msg):
|
||||
holo_user = HoloUser((await app.get_users(msg.command[1])).id)
|
||||
except bad_request_400.UsernameInvalid:
|
||||
await msg.reply_text(locale("no_user_application", "message").format(msg.command[1]), quote=should_quote(msg))
|
||||
return
|
||||
|
||||
application = col_applications.find_one({"user": holo_user.id})
|
||||
application_content = []
|
||||
|
@ -1,22 +0,0 @@
|
||||
from app import app
|
||||
from pyrogram import filters
|
||||
from modules.utils import configGet, should_quote
|
||||
|
||||
# Nearby command ===============================================================================================================
|
||||
@app.on_message(~ filters.scheduled & filters.private & filters.chat(configGet("admin_group")) & filters.chat(configGet("destination_group")) & filters.command(["nearby"], prefixes=["/"]))
|
||||
async def cmd_nearby(app, msg):
|
||||
await msg.reply_text("Yes, I exist.", quote=should_quote(msg))
|
||||
# if not path.exists(f"{configGet('data', 'locations')}{sep}sponsors{sep}{msg.from_user.id}.json"):
|
||||
# jsonSave(jsonLoad(f"{configGet('data', 'locations')}{sep}sponsor_default.json"), f"{configGet('data', 'locations')}{sep}sponsors{sep}{msg.from_user.id}.json")
|
||||
# sponsor = jsonLoad(f"{configGet('data', 'locations')}{sep}sponsors{sep}{msg.from_user.id}.json")
|
||||
# if sponsor["approved"]:
|
||||
# if sponsor["expires"] is not None:
|
||||
# if datetime.strptime(sponsor["expires"], "%d.%m.%Y") > datetime.now():
|
||||
# await msg.reply_text(f"You have an active sub til **{sponsor['expires']}**.")
|
||||
# else:
|
||||
# await msg.reply_text(f"Your sub expired {int((datetime.now()-datetime.strptime(sponsor['expires'], '%d.%m.%Y')).days)} days ago.")
|
||||
# elif sponsor["approved"]:
|
||||
# await msg.reply_text(f"Your sub expiration date is not valid.")
|
||||
# else:
|
||||
# await msg.reply_text(f"You have no active subscription.")
|
||||
# ==============================================================================================================================
|
@ -53,7 +53,8 @@ async def confirm_yes(app, msg):
|
||||
InlineKeyboardButton(text=str(locale("reapply_no", "button")), callback_data=f"reapply_no_{holo_user.id}")
|
||||
]
|
||||
]
|
||||
)
|
||||
),
|
||||
parse_mode=ParseMode.MARKDOWN
|
||||
)
|
||||
else:
|
||||
await app.send_message(chat_id=configGet("admin_group"), text=(locale("application_got", "message")).format(str(holo_user.id), msg.from_user.first_name, msg.from_user.last_name, msg.from_user.username, "\n".join(application_content)), parse_mode=ParseMode.MARKDOWN, reply_markup=InlineKeyboardMarkup(
|
||||
@ -71,7 +72,8 @@ async def confirm_yes(app, msg):
|
||||
InlineKeyboardButton(text=str(locale("sub_russian", "button")), callback_data=f"sub_russian_{holo_user.id}")
|
||||
]
|
||||
]
|
||||
)
|
||||
),
|
||||
parse_mode=ParseMode.MARKDOWN
|
||||
)
|
||||
|
||||
logWrite(f"User {holo_user.id} sent his application and it will now be reviewed")
|
||||
|
Reference in New Issue
Block a user