简体   繁体   English

如何在没有用户使用电报机器人上传的情况下发送 gif 或视频

[英]How can I send gif or video without users uploading using telegram bot

elif message.text == 'Test':
            video = open('static/ct_ramp.mkv','rb')
            await message.answer_video(video)
            video.close()

I use aiogram and this code to sending my video but I should upload it to see: https://i.stack.imgur.com/NcYjg.png我使用 aiogram 和此代码来发送我的视频,但我应该上传它以查看: https://i.stack.imgur.com/NcYjg.png
How can I send it and see it right now?我如何发送它并立即查看?

You can't.你不能。 Each user must configure their own Telegram client for automatic downloading of media.每个用户都必须配置自己的 Telegram 客户端以自动下载媒体。 You or your bot can't force that in the user side.您或您的机器人无法在用户端强制执行此操作。

What you can do is configure your own Telegram client (android, desktop, etc.) to use automatic download of videos, then the autoplay feature will work for big size videos for you .您可以做的是配置您自己的 Telegram 客户端(安卓、桌面等)以使用自动下载视频,然后自动播放功能将适用于的大尺寸视频。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM