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:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user