mirror of
https://github.com/yasirarism/MissKatyPyro.git
synced 2026-01-03 11:04:51 +00:00
check in pv only, max_concurrent_transmissions removed in Client
This commit is contained in:
parent
420c0536e7
commit
41fa4854a1
1 changed files with 2 additions and 6 deletions
|
|
@ -8,16 +8,12 @@ from misskaty.helper.localization import use_chat_lang
|
||||||
from misskaty.vars import COMMAND_HANDLER, LOG_CHANNEL, SUDO, SUPPORT_CHAT
|
from misskaty.vars import COMMAND_HANDLER, LOG_CHANNEL, SUDO, SUPPORT_CHAT
|
||||||
|
|
||||||
|
|
||||||
@app.on_message(filters.incoming, group=-5)
|
@app.on_message(filters.incoming & filters.private, group=-5)
|
||||||
async def ban_reply(_, ctx: Message):
|
async def ban_reply(_, ctx: Message):
|
||||||
if not ctx.from_user:
|
if not ctx.from_user:
|
||||||
return
|
return
|
||||||
ban = await db.get_ban_status(ctx.from_user.id)
|
ban = await db.get_ban_status(ctx.from_user.id)
|
||||||
if (ban.get("is_banned") and ctx.chat.type.value == "private") or (
|
if ban.get("is_banned"):
|
||||||
ban.get("is_banned")
|
|
||||||
and ctx.chat.type.value == "supergroup"
|
|
||||||
and bool(ctx.command)
|
|
||||||
):
|
|
||||||
await ctx.reply_msg(
|
await ctx.reply_msg(
|
||||||
f'I am sorry, You are banned to use Me. \nBan Reason: {ban["ban_reason"]}'
|
f'I am sorry, You are banned to use Me. \nBan Reason: {ban["ban_reason"]}'
|
||||||
)
|
)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue