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 -10
View File
@@ -18,18 +18,17 @@ import asyncio
from pyrogram import Client, filters
from pyrogram.types import Message
from utils.misc import modules_help, prefix
commands = ["spam", "statspam", "slowspam", "fastspam"]
commands = ['spam', 'statspam', 'slowspam', 'fastspam']
@Client.on_message(filters.command(commands, prefix) & filters.me)
async def spam(client: Client, message: Message):
amount = int(message.command[1])
text = " ".join(message.command[2:])
text = ' '.join(message.command[2:])
cooldown = {"spam": 0.15, "statspam": 0.1, "slowspam": 0.9, "fastspam": 0}
cooldown = {'spam': 0.15, 'statspam': 0.1, 'slowspam': 0.9, 'fastspam': 0}
await message.delete()
@@ -39,16 +38,16 @@ async def spam(client: Client, message: Message):
else:
sent = await client.send_message(message.chat.id, text)
if message.command[0] == "statspam":
if message.command[0] == 'statspam':
await asyncio.sleep(0.1)
await sent.delete()
await asyncio.sleep(cooldown[message.command[0]])
modules_help["spam"] = {
"spam [amount] [text]": "Start spam",
"statspam [amount] [text]": "Send and delete",
"fastspam [amount] [text]": "Start fast spam",
"slowspam [amount] [text]": "Start slow spam",
modules_help['spam'] = {
'spam [amount] [text]': 'Start spam',
'statspam [amount] [text]': 'Send and delete',
'fastspam [amount] [text]': 'Start fast spam',
'slowspam [amount] [text]': 'Start slow spam',
}