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:
2026-06-19 12:19:01 +02:00
parent 95cec59263
commit 7ba6bc44f2
104 changed files with 4338 additions and 5319 deletions
+9 -12
View File
@@ -1,13 +1,12 @@
from random import choice, randint
from random import randint
from pyrogram import Client, filters, enums
from pyrogram import Client, enums, filters
from pyrogram.types import Message
from utils.misc import modules_help, prefix
from utils.scripts import format_exc
@Client.on_message(filters.command(["aniq", "aq"], prefix) & filters.me)
@Client.on_message(filters.command(['aniq', 'aq'], prefix) & filters.me)
async def aniquotes_handler(client: Client, message: Message):
if message.reply_to_message and message.reply_to_message.text:
query = message.reply_to_message.text[:512]
@@ -17,27 +16,25 @@ async def aniquotes_handler(client: Client, message: Message):
query = message.text.split(maxsplit=1)[1][:512]
else:
return await message.edit(
"<b>[💮 Aniquotes] <i>Please enter text to create sticker.</i></b>",
'<b>[💮 Aniquotes] <i>Please enter text to create sticker.</i></b>',
parse_mode=enums.ParseMode.HTML,
)
try:
await message.delete()
result = await client.get_inline_bot_results("@quotafbot", query)
result = await client.get_inline_bot_results('@quotafbot', query)
return await message.reply_inline_bot_result(
query_id=result.query_id,
result_id=result.results[randint(1, 2)].id,
reply_to_message_id=(
message.reply_to_message.id if message.reply_to_message else None
),
reply_to_message_id=(message.reply_to_message.id if message.reply_to_message else None),
)
except Exception as e:
return await message.reply(
f"<b>[💮 Aniquotes]</b>\n<code>{format_exc(e)}</code>",
f'<b>[💮 Aniquotes]</b>\n<code>{format_exc(e)}</code>',
parse_mode=enums.ParseMode.HTML,
)
modules_help["aniquotes"] = {
"aq [text]": "Create animated sticker with text",
modules_help['aniquotes'] = {
'aq [text]': 'Create animated sticker with text',
}