mirror of
https://github.com/yasirarism/MissKatyPyro.git
synced 2025-12-29 17:44:50 +00:00
Jika bot dimute, auto leave :(
Signed-off-by: Yasir Aris M <github@yasirdev.my.id>
This commit is contained in:
parent
0fd013b906
commit
7fe984783b
1 changed files with 2 additions and 1 deletions
|
|
@ -8,6 +8,7 @@ from PIL import Image, ImageChops, ImageDraw, ImageFont
|
|||
from pyrogram import enums, filters
|
||||
from pyrogram.errors import (
|
||||
ChatAdminRequired,
|
||||
ChatSendPhotosForbidden,
|
||||
ChatWriteForbidden,
|
||||
MessageTooLong,
|
||||
RPCError,
|
||||
|
|
@ -205,7 +206,7 @@ async def greet_group(bot, message, strings):
|
|||
LOGGER.error(f"ERROR in Combot API Detection. {err}")
|
||||
if userspammer != "":
|
||||
await bot.send_message(message.chat.id, userspammer)
|
||||
except ChatWriteForbidden:
|
||||
except (ChatWriteForbidden, ChatSendPhotosForbidden):
|
||||
await message.chat.leave()
|
||||
except Exception as e:
|
||||
LOGGER.info(e)
|
||||
|
|
|
|||
Loading…
Reference in a new issue