diff options
| author | Igor <50257429+igorechek06@users.noreply.github.com> | 2021-10-15 16:38:24 +0900 |
|---|---|---|
| committer | Igor <50257429+igorechek06@users.noreply.github.com> | 2021-10-15 16:38:24 +0900 |
| commit | cb52a852985e9c327a6d5b64e942e620198b48b8 (patch) | |
| tree | 4461b745f3dfafcc128217ec5c5b88bf5ad524d7 | |
| parent | 51eaa98b9da48ce7a9d6abb8c014cad512aaf8e3 (diff) | |
| download | karpov_ai_bot-cb52a852985e9c327a6d5b64e942e620198b48b8.tar.gz karpov_ai_bot-cb52a852985e9c327a6d5b64e942e620198b48b8.zip | |
Баг фикс
| -rw-r--r-- | handlers/gif.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/handlers/gif.py b/handlers/gif.py index 62189bc..5b3d5bc 100644 --- a/handlers/gif.py +++ b/handlers/gif.py | |||
| @@ -3,7 +3,6 @@ from os import system as run | |||
| 3 | from aiogram import types as t | 3 | from aiogram import types as t |
| 4 | from aiogram.dispatcher import filters | 4 | from aiogram.dispatcher import filters |
| 5 | 5 | ||
| 6 | from handlers.gen import получить_говно | ||
| 7 | from shared.instances import dp | 6 | from shared.instances import dp |
| 8 | 7 | ||
| 9 | 8 | ||
| @@ -12,6 +11,8 @@ from shared.instances import dp | |||
| 12 | content_types=[t.ContentType.PHOTO, t.ContentType.DOCUMENT], | 11 | content_types=[t.ContentType.PHOTO, t.ContentType.DOCUMENT], |
| 13 | ) | 12 | ) |
| 14 | async def высрать_гифку_по_фото(msg: t.Message): | 13 | async def высрать_гифку_по_фото(msg: t.Message): |
| 14 | from handlers.gen import получить_говно | ||
| 15 | |||
| 15 | if await скачать_и_обработать_файл(msg): | 16 | if await скачать_и_обработать_файл(msg): |
| 16 | with open("tmp/gif.mp4", "rb") as file: | 17 | with open("tmp/gif.mp4", "rb") as file: |
| 17 | await msg.reply_animation(file, caption=получить_говно()) | 18 | await msg.reply_animation(file, caption=получить_говно()) |
| @@ -22,6 +23,8 @@ async def высрать_гифку_по_фото(msg: t.Message): | |||
| 22 | content_types=[t.ContentType.TEXT], | 23 | content_types=[t.ContentType.TEXT], |
| 23 | ) | 24 | ) |
| 24 | async def высрать_гифку_по_ответу(msg: t.Message): | 25 | async def высрать_гифку_по_ответу(msg: t.Message): |
| 26 | from handlers.gen import получить_говно | ||
| 27 | |||
| 25 | if await скачать_и_обработать_файл(msg): | 28 | if await скачать_и_обработать_файл(msg): |
| 26 | with open("tmp/gif.mp4", "rb") as file: | 29 | with open("tmp/gif.mp4", "rb") as file: |
| 27 | await msg.reply_animation(file, caption=получить_говно()) | 30 | await msg.reply_animation(file, caption=получить_говно()) |
