chore(userbot): apply ruff check --fix and ruff format
- ruff check --fix: 210 auto-fixed errors (import sorting, trailing whitespace, unused imports, f-string fixups, deprecated annotations) - ruff format: 104 files reformatted to consistent style - 268 non-auto-fixable issues remain (S113 requests timeout, etc.)
This commit is contained in:
@@ -18,20 +18,19 @@ import asyncio
|
||||
|
||||
from pyrogram import Client, filters
|
||||
from pyrogram.types import Message
|
||||
|
||||
from utils.misc import modules_help, prefix
|
||||
|
||||
|
||||
@Client.on_message(filters.command(["leave_chat", "lc"], prefix) & filters.me)
|
||||
@Client.on_message(filters.command(['leave_chat', 'lc'], prefix) & filters.me)
|
||||
async def leave_chat(_, message: Message):
|
||||
if message.chat.type != "private":
|
||||
await message.edit("<b>Goodbye...</b>")
|
||||
if message.chat.type != 'private':
|
||||
await message.edit('<b>Goodbye...</b>')
|
||||
await asyncio.sleep(3)
|
||||
await message.chat.leave()
|
||||
else:
|
||||
await message.edit("<b>Not supported in private chats</b>")
|
||||
await message.edit('<b>Not supported in private chats</b>')
|
||||
|
||||
|
||||
modules_help["leave_chat"] = {
|
||||
"leave_chat": "Quit chat",
|
||||
modules_help['leave_chat'] = {
|
||||
'leave_chat': 'Quit chat',
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user