diff --git a/tg_bot/app.py b/tg_bot/app.py index e995dfd..4271984 100644 --- a/tg_bot/app.py +++ b/tg_bot/app.py @@ -9,7 +9,7 @@ from aiogram.filters import CommandStart from aiogram.types import Message from aiogram.utils.markdown import hbold -from tg_bot.handlers.lesson_two import router as router_one +from tg_bot.handlers.lesson_tree import router as router_one TOKEN: str = getenv('BOT_TOKEN') or 'Your TG_BOT token' diff --git a/tg_bot/handlers/lesson_tree.py b/tg_bot/handlers/lesson_tree.py new file mode 100644 index 0000000..5f1d4a8 --- /dev/null +++ b/tg_bot/handlers/lesson_tree.py @@ -0,0 +1,13 @@ +from aiogram import Bot, F, Router +from aiogram.types import FSInputFile, Message + +router = Router() + + +@router.message(F.video) +async def greating(message: Message, bot: Bot): + await bot.download(message.video, destination='./video.mp4') + + await bot.send_video_note( + chat_id=message.chat.id, video_note=FSInputFile('video.mp4') + ) diff --git a/video.mp4 b/video.mp4 new file mode 100644 index 0000000..4689c99 Binary files /dev/null and b/video.mp4 differ