ДЗ 3
parent
9dba5b26f3
commit
71b640570d
|
@ -9,7 +9,7 @@ from aiogram.filters import CommandStart
|
||||||
from aiogram.types import Message
|
from aiogram.types import Message
|
||||||
from aiogram.utils.markdown import hbold
|
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'
|
TOKEN: str = getenv('BOT_TOKEN') or 'Your TG_BOT token'
|
||||||
|
|
||||||
|
|
|
@ -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')
|
||||||
|
)
|
Loading…
Reference in New Issue