fix(userbot): add missing safone.py imports, apply ruff --unsafe-fixes

- Add missing aiohttp, PIL, BytesIO imports to safone.py (F821 runtime bugs)
- Apply ruff --unsafe-fixes (27 fixes): ternary operators, .get() patterns,
  contextlib.suppress, enumerate(), collapsible if/else, remove .keys()
This commit is contained in:
2026-06-19 15:27:12 +02:00
parent fc83176522
commit 70d7855f06
20 changed files with 29 additions and 57 deletions
+1 -4
View File
@@ -15,10 +15,7 @@ def prettify(val: int) -> str:
async def ghoul_counter(_, message: Message):
await message.delete()
if len(message.command) > 1 and message.command[1].isdigit():
counter = int(message.command[1])
else:
counter = 1000
counter = int(message.command[1]) if len(message.command) > 1 and message.command[1].isdigit() else 1000
msg = await message.reply(prettify(counter), quote=False)