Improved logging
This commit is contained in:
parent
1aed7bff7b
commit
626492fb3c
@ -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"},
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user