mirror of
https://github.com/yasirarism/MissKatyPyro.git
synced 2026-01-03 11:04:51 +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 import enums, filters
|
||||||
from pyrogram.errors import (
|
from pyrogram.errors import (
|
||||||
ChatAdminRequired,
|
ChatAdminRequired,
|
||||||
|
ChatSendPhotosForbidden,
|
||||||
ChatWriteForbidden,
|
ChatWriteForbidden,
|
||||||
MessageTooLong,
|
MessageTooLong,
|
||||||
RPCError,
|
RPCError,
|
||||||
|
|
@ -205,7 +206,7 @@ async def greet_group(bot, message, strings):
|
||||||
LOGGER.error(f"ERROR in Combot API Detection. {err}")
|
LOGGER.error(f"ERROR in Combot API Detection. {err}")
|
||||||
if userspammer != "":
|
if userspammer != "":
|
||||||
await bot.send_message(message.chat.id, userspammer)
|
await bot.send_message(message.chat.id, userspammer)
|
||||||
except ChatWriteForbidden:
|
except (ChatWriteForbidden, ChatSendPhotosForbidden):
|
||||||
await message.chat.leave()
|
await message.chat.leave()
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
LOGGER.info(e)
|
LOGGER.info(e)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue