Improved logging

This commit is contained in:
Profitroll 2023-01-02 14:24:29 +01:00
parent 1aed7bff7b
commit 626492fb3c

View File

@ -36,7 +36,7 @@ async def callback_query_sponsor_yes(app: Client, clb: CallbackQuery):
await app.send_message(configGet("admin_group"), locale("sponsor_approved_by", "message").format(clb.from_user.first_name, holo_user.id), disable_notification=True) await app.send_message(configGet("admin_group"), locale("sponsor_approved_by", "message").format(clb.from_user.first_name, holo_user.id), disable_notification=True)
await app.send_message(holo_user.id, locale("sponsor_approved", "message", locale=holo_user)) await app.send_message(holo_user.id, locale("sponsor_approved", "message", locale=holo_user))
logWrite(f"User {holo_user.id} got approved by {clb.from_user.id}") logWrite(f"User {holo_user.id} got sponsorship approved by {clb.from_user.id}")
if col_sponsorships.find_one({"user": holo_user.id}) is not None: if col_sponsorships.find_one({"user": holo_user.id}) is not None:
col_sponsorships.update_one({"user": holo_user.id}, col_sponsorships.update_one({"user": holo_user.id},
@ -82,7 +82,7 @@ async def callback_query_sponsor_no(app: Client, clb: CallbackQuery):
await app.send_message(configGet("admin_group"), locale("sponsor_rejected_by", "message").format(clb.from_user.first_name, holo_user.id), disable_notification=True) await app.send_message(configGet("admin_group"), locale("sponsor_rejected_by", "message").format(clb.from_user.first_name, holo_user.id), disable_notification=True)
await app.send_message(holo_user.id, locale("sponsor_rejected", "message", locale=holo_user)) await app.send_message(holo_user.id, locale("sponsor_rejected", "message", locale=holo_user))
logWrite(f"User {holo_user.id} got rejected by {clb.from_user.id}") logWrite(f"User {holo_user.id} got sponsorship rejected by {clb.from_user.id}")
col_tmp.update_one({"user": holo_user.id, "type": "sponsorship"}, col_tmp.update_one({"user": holo_user.id, "type": "sponsorship"},
{ {