ДЗ 3
This commit is contained in:
@@ -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'
|
||||
|
||||
|
13
tg_bot/handlers/lesson_tree.py
Normal file
13
tg_bot/handlers/lesson_tree.py
Normal file
@@ -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')
|
||||
)
|
Reference in New Issue
Block a user