diff --git a/.gitignore b/.gitignore index fdcedd81e0..1bc8d16e95 100644 --- a/.gitignore +++ b/.gitignore @@ -24,6 +24,7 @@ wheels/ .installed.cfg *.egg MANIFEST +.DS_Store # PyInstaller # Usually these files are written by a python script from a template diff --git a/.vscode/settings.json b/.vscode/settings.json index 79a400d068..c86196bb72 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,8 +1,8 @@ { "editor.codeActionsOnSave": { - "source.organizeImports": true, - "source.fixAll": true, - "sourcery.apply": true + "source.organizeImports": "explicit", + "source.fixAll": "explicit", + "sourcery.apply": "explicit" }, "python.formatting.provider": "black", "editor.formatOnSave": true, diff --git a/userbot/plugins/images.py b/userbot/plugins/images.py index f15a6ee32b..445faf6276 100644 --- a/userbot/plugins/images.py +++ b/userbot/plugins/images.py @@ -69,9 +69,14 @@ async def img_sampler(event): paths = response.download(arguments) except Exception as e: return await cat.edit(f"Error: \n`{e}`") + lst = paths[0][query.replace(",", " ")] + try: await event.client.send_file(event.chat_id, lst, reply_to=reply_to_id) + except TypeError as e: + print(paths[1]) + return await cat.edit(f"Error: \n`{e}`") except MediaEmptyError: for i in lst: with contextlib.suppress(MediaEmptyError):