Ok
Browse files- akn/manage/approve_params.py +29 -43
akn/manage/approve_params.py
CHANGED
@@ -132,13 +132,12 @@ async def handle_approvalub(client, callback, request, user_id, admin_id, admin_
|
|
132 |
)
|
133 |
await notify_userub(client, user_id, bot_user)
|
134 |
await client.send_message(
|
135 |
-
|
136 |
f"β
Userbot Approved Successfully\n\n"
|
137 |
f"π€ User: {request.get('username', 'N/A')} ({user_id})\n"
|
138 |
f"β Username: {bot_user.username}\n"
|
139 |
f"π Approved by: {admin_mention}\n"
|
140 |
-
f"β° Time: {dt.now().strftime('%Y-%m-%d %H:%M:%S')}"
|
141 |
-
message_thread_id=23159
|
142 |
)
|
143 |
except Exception as e:
|
144 |
LOGS.error(f"Approval error: {str(e)}")
|
@@ -167,12 +166,11 @@ async def handle_errorub(client, callback, error, action, admin_mention):
|
|
167 |
f"{callback.message.text}\n\nβ Error: {str(error)}"
|
168 |
)
|
169 |
await client.send_message(
|
170 |
-
|
171 |
f"π¨ Admin Action Error\n\n"
|
172 |
f"Action: {action}\n"
|
173 |
f"Admin: {admin_mention}\n"
|
174 |
-
f"Error: {str(error)}"
|
175 |
-
message_thread_id=23245
|
176 |
)
|
177 |
|
178 |
@ren.on_callback_query(filters.regex(r"^(rejected_alldl|pending_alldl|approved_alldl)_(\d+)_(\w+)$"))
|
@@ -270,7 +268,7 @@ async def handle_admin_action(client: Client, callback: CallbackQuery):
|
|
270 |
)
|
271 |
|
272 |
caption = (
|
273 |
-
"π **Your
|
274 |
f"π€ Bot Name: {bot_user.first_name}\n"
|
275 |
f"π Username: {bot_username}\n"
|
276 |
f"π Bot ID: `{bot_user.id}`\n\n"
|
@@ -291,13 +289,12 @@ async def handle_admin_action(client: Client, callback: CallbackQuery):
|
|
291 |
)
|
292 |
|
293 |
await client.send_message(
|
294 |
-
|
295 |
f"β
Bot Approved Successfully\n\n"
|
296 |
f"π€ User: {request.get('username', 'N/A')} ({user_id})\n"
|
297 |
f"π€ Bot: {bot_username}\n"
|
298 |
f"π Approved by: {admin_mention}\n"
|
299 |
-
f"β° Time: {dt.now().strftime('%Y-%m-%d %H:%M:%S')}"
|
300 |
-
message_thread_id=23159
|
301 |
)
|
302 |
|
303 |
except Exception as e:
|
@@ -316,12 +313,11 @@ async def handle_admin_action(client: Client, callback: CallbackQuery):
|
|
316 |
}
|
317 |
)
|
318 |
await client.send_message(
|
319 |
-
|
320 |
f"β Bot Approval Failed\n\n"
|
321 |
f"User ID: {user_id}\n"
|
322 |
f"Error: {str(e)}\n"
|
323 |
-
f"UUID: `{uuid}`"
|
324 |
-
message_thread_id=23245
|
325 |
)
|
326 |
await client.send_message(
|
327 |
user_id,
|
@@ -352,12 +348,11 @@ async def handle_admin_action(client: Client, callback: CallbackQuery):
|
|
352 |
f"β Error: {str(e)}"
|
353 |
)
|
354 |
await client.send_message(
|
355 |
-
|
356 |
f"π¨ Admin Action Error\n\n"
|
357 |
f"Action: {action}\n"
|
358 |
f"Admin: {admin_mention}\n"
|
359 |
-
f"Error: {str(e)}"
|
360 |
-
message_thread_id=23245
|
361 |
)
|
362 |
|
363 |
@ren.on_callback_query(filters.regex(r"^(approve_capt|reject_capt)_(\d+)$"))
|
@@ -394,9 +389,8 @@ async def handle_captbot_action(client, callback: CallbackQuery):
|
|
394 |
except Exception as e:
|
395 |
await client.send_message(user_id, "Sorry Try Again")
|
396 |
await client.send_message(
|
397 |
-
|
398 |
-
f"Error captcha {str(e)}"
|
399 |
-
message_thread_id=23245
|
400 |
)
|
401 |
return
|
402 |
|
@@ -439,9 +433,8 @@ async def handle_captbot_action(client, callback: CallbackQuery):
|
|
439 |
)
|
440 |
except Exception as e:
|
441 |
await client.send_message(
|
442 |
-
|
443 |
-
f"Error captcha {str(e)}"
|
444 |
-
message_thread_id=23245
|
445 |
)
|
446 |
await client.send_message(user_id, "Sorry Try Again")
|
447 |
return
|
@@ -488,9 +481,8 @@ async def handle_sesibot_action(client, callback: CallbackQuery):
|
|
488 |
except Exception as e:
|
489 |
await client.send_message(user_id, "Sorry Try Again")
|
490 |
await client.send_message(
|
491 |
-
|
492 |
-
f"Error sesibot {str(e)}"
|
493 |
-
message_thread_id=23245
|
494 |
)
|
495 |
return
|
496 |
|
@@ -529,9 +521,8 @@ async def handle_sesibot_action(client, callback: CallbackQuery):
|
|
529 |
)
|
530 |
except Exception as e:
|
531 |
await client.send_message(
|
532 |
-
|
533 |
-
f"Error sesibot {str(e)}"
|
534 |
-
message_thread_id=23245
|
535 |
)
|
536 |
await client.send_message(user_id, "Sorry Try Again")
|
537 |
return
|
@@ -578,9 +569,8 @@ async def handle_magicbot_action(client, callback: CallbackQuery):
|
|
578 |
except Exception as e:
|
579 |
await client.send_message(user_id, "Sorry Try Again")
|
580 |
await client.send_message(
|
581 |
-
|
582 |
-
f"Error magic {str(e)}"
|
583 |
-
message_thread_id=23245
|
584 |
)
|
585 |
return
|
586 |
|
@@ -623,9 +613,8 @@ async def handle_magicbot_action(client, callback: CallbackQuery):
|
|
623 |
)
|
624 |
except Exception as e:
|
625 |
await client.send_message(
|
626 |
-
|
627 |
-
f"Error Magic {str(e)}"
|
628 |
-
message_thread_id=23245
|
629 |
)
|
630 |
await client.send_message(user_id, "Sorry Try Again")
|
631 |
return
|
@@ -671,9 +660,8 @@ async def handle_ytbot_action(client, callback: CallbackQuery):
|
|
671 |
except Exception as e:
|
672 |
await client.send_message(user_id, "Sorry Try Again")
|
673 |
await client.send_message(
|
674 |
-
|
675 |
-
f"Error ytbot {str(e)}"
|
676 |
-
message_thread_id=23245
|
677 |
)
|
678 |
return
|
679 |
|
@@ -716,9 +704,8 @@ async def handle_ytbot_action(client, callback: CallbackQuery):
|
|
716 |
)
|
717 |
except Exception as e:
|
718 |
await client.send_message(
|
719 |
-
|
720 |
-
f"Error Ytbot {str(e)}"
|
721 |
-
message_thread_id=23245
|
722 |
)
|
723 |
await client.send_message(user_id, "Sorry Try Again")
|
724 |
return
|
@@ -806,9 +793,8 @@ async def handle_geminibot_action(client, callback: CallbackQuery):
|
|
806 |
)
|
807 |
except Exception as e:
|
808 |
await client.send_message(
|
809 |
-
|
810 |
-
f"Error Gemini {str(e)}"
|
811 |
-
message_thread_id=23245
|
812 |
)
|
813 |
await client.send_message(user_id, "Sorry Try Again")
|
814 |
return
|
|
|
132 |
)
|
133 |
await notify_userub(client, user_id, bot_user)
|
134 |
await client.send_message(
|
135 |
+
-1002407639480,
|
136 |
f"β
Userbot Approved Successfully\n\n"
|
137 |
f"π€ User: {request.get('username', 'N/A')} ({user_id})\n"
|
138 |
f"β Username: {bot_user.username}\n"
|
139 |
f"π Approved by: {admin_mention}\n"
|
140 |
+
f"β° Time: {dt.now().strftime('%Y-%m-%d %H:%M:%S')}"
|
|
|
141 |
)
|
142 |
except Exception as e:
|
143 |
LOGS.error(f"Approval error: {str(e)}")
|
|
|
166 |
f"{callback.message.text}\n\nβ Error: {str(error)}"
|
167 |
)
|
168 |
await client.send_message(
|
169 |
+
-1002407639480,
|
170 |
f"π¨ Admin Action Error\n\n"
|
171 |
f"Action: {action}\n"
|
172 |
f"Admin: {admin_mention}\n"
|
173 |
+
f"Error: {str(error)}"
|
|
|
174 |
)
|
175 |
|
176 |
@ren.on_callback_query(filters.regex(r"^(rejected_alldl|pending_alldl|approved_alldl)_(\d+)_(\w+)$"))
|
|
|
268 |
)
|
269 |
|
270 |
caption = (
|
271 |
+
"π **Your Azrea Bot Has Been Approved!**\n\n"
|
272 |
f"π€ Bot Name: {bot_user.first_name}\n"
|
273 |
f"π Username: {bot_username}\n"
|
274 |
f"π Bot ID: `{bot_user.id}`\n\n"
|
|
|
289 |
)
|
290 |
|
291 |
await client.send_message(
|
292 |
+
-1002407639480,
|
293 |
f"β
Bot Approved Successfully\n\n"
|
294 |
f"π€ User: {request.get('username', 'N/A')} ({user_id})\n"
|
295 |
f"π€ Bot: {bot_username}\n"
|
296 |
f"π Approved by: {admin_mention}\n"
|
297 |
+
f"β° Time: {dt.now().strftime('%Y-%m-%d %H:%M:%S')}"
|
|
|
298 |
)
|
299 |
|
300 |
except Exception as e:
|
|
|
313 |
}
|
314 |
)
|
315 |
await client.send_message(
|
316 |
+
-1002407639480,
|
317 |
f"β Bot Approval Failed\n\n"
|
318 |
f"User ID: {user_id}\n"
|
319 |
f"Error: {str(e)}\n"
|
320 |
+
f"UUID: `{uuid}`"
|
|
|
321 |
)
|
322 |
await client.send_message(
|
323 |
user_id,
|
|
|
348 |
f"β Error: {str(e)}"
|
349 |
)
|
350 |
await client.send_message(
|
351 |
+
-1002407639480,
|
352 |
f"π¨ Admin Action Error\n\n"
|
353 |
f"Action: {action}\n"
|
354 |
f"Admin: {admin_mention}\n"
|
355 |
+
f"Error: {str(e)}"
|
|
|
356 |
)
|
357 |
|
358 |
@ren.on_callback_query(filters.regex(r"^(approve_capt|reject_capt)_(\d+)$"))
|
|
|
389 |
except Exception as e:
|
390 |
await client.send_message(user_id, "Sorry Try Again")
|
391 |
await client.send_message(
|
392 |
+
-1002407639480,
|
393 |
+
f"Error captcha {str(e)}"
|
|
|
394 |
)
|
395 |
return
|
396 |
|
|
|
433 |
)
|
434 |
except Exception as e:
|
435 |
await client.send_message(
|
436 |
+
-1002407639480,
|
437 |
+
f"Error captcha {str(e)}"
|
|
|
438 |
)
|
439 |
await client.send_message(user_id, "Sorry Try Again")
|
440 |
return
|
|
|
481 |
except Exception as e:
|
482 |
await client.send_message(user_id, "Sorry Try Again")
|
483 |
await client.send_message(
|
484 |
+
-1002407639480,
|
485 |
+
f"Error sesibot {str(e)}"
|
|
|
486 |
)
|
487 |
return
|
488 |
|
|
|
521 |
)
|
522 |
except Exception as e:
|
523 |
await client.send_message(
|
524 |
+
-1002407639480,
|
525 |
+
f"Error sesibot {str(e)}"
|
|
|
526 |
)
|
527 |
await client.send_message(user_id, "Sorry Try Again")
|
528 |
return
|
|
|
569 |
except Exception as e:
|
570 |
await client.send_message(user_id, "Sorry Try Again")
|
571 |
await client.send_message(
|
572 |
+
-1002407639480,
|
573 |
+
f"Error magic {str(e)}"
|
|
|
574 |
)
|
575 |
return
|
576 |
|
|
|
613 |
)
|
614 |
except Exception as e:
|
615 |
await client.send_message(
|
616 |
+
-1002407639480,
|
617 |
+
f"Error Magic {str(e)}"
|
|
|
618 |
)
|
619 |
await client.send_message(user_id, "Sorry Try Again")
|
620 |
return
|
|
|
660 |
except Exception as e:
|
661 |
await client.send_message(user_id, "Sorry Try Again")
|
662 |
await client.send_message(
|
663 |
+
-1002407639480,
|
664 |
+
f"Error ytbot {str(e)}"
|
|
|
665 |
)
|
666 |
return
|
667 |
|
|
|
704 |
)
|
705 |
except Exception as e:
|
706 |
await client.send_message(
|
707 |
+
-1002407639480,
|
708 |
+
f"Error Ytbot {str(e)}"
|
|
|
709 |
)
|
710 |
await client.send_message(user_id, "Sorry Try Again")
|
711 |
return
|
|
|
793 |
)
|
794 |
except Exception as e:
|
795 |
await client.send_message(
|
796 |
+
-1002407639480,
|
797 |
+
f"Error Gemini {str(e)}"
|
|
|
798 |
)
|
799 |
await client.send_message(user_id, "Sorry Try Again")
|
800 |
return
|