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 c905bbd039
commit 20bce5b31c
20 changed files with 29 additions and 57 deletions
+1 -4
View File
@@ -101,10 +101,7 @@ async def spin_handler(client: Client, message: Message):
filename = 'sticker.webp'
elif message.reply_to_message.text:
result = await quote_cmd(client, message)
if result[1]:
filename = 'sticker.png'
else:
filename = 'sticker.webp'
filename = 'sticker.png' if result[1] else 'sticker.webp'
open('downloads/' + filename, 'wb').write(result[0].getbuffer())
coro = False
else: