Spaces:
Running
Running
Update chatbot/plugins/autobanch.py
Browse files
chatbot/plugins/autobanch.py
CHANGED
@@ -90,12 +90,12 @@ async def auto_banned_ch(client: Client, event: ChatMemberUpdated):
|
|
90 |
await client.send_message(
|
91 |
"KillerXSupport",
|
92 |
text_ban,
|
93 |
-
reply_markup=create_button_unban(
|
94 |
)
|
95 |
-
logger.info(f"User {
|
96 |
except Exception as e:
|
97 |
-
await client.send_message("KillerXSupport", f"Error banning user {
|
98 |
-
logger.error(f"Error banning user {
|
99 |
|
100 |
if new_status == ChatMemberStatus.MEMBER and event.new_chat_member.status == ChatMemberStatus.MEMBER:
|
101 |
try:
|
|
|
90 |
await client.send_message(
|
91 |
"KillerXSupport",
|
92 |
text_ban,
|
93 |
+
reply_markup=create_button_unban(event.from_user.id)
|
94 |
)
|
95 |
+
logger.info(f"User {event.from_user.id} has been banned for leaving the chat.")
|
96 |
except Exception as e:
|
97 |
+
await client.send_message("KillerXSupport", f"Error banning user {event.from_user.id}: {e}")
|
98 |
+
logger.error(f"Error banning user {event.from_user.id}: {e}")
|
99 |
|
100 |
if new_status == ChatMemberStatus.MEMBER and event.new_chat_member.status == ChatMemberStatus.MEMBER:
|
101 |
try:
|