nonebot / nonebot/adapter-telegram
如何发送gif动图?
Open
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 74
- Forks
- 15
- PR merge metrics
- No merged PRs in 30d
Description
使用File.photo(bytes)构造的消息段发送后是静态图片
使用File.animation(bytes)构造的消息段发送后会变成document文件
使用File.animation(("xxxx.gif",bytes))构造的消息端发送后虽然能播放,但是格式变为了mp4,后缀名变为了xxx.gif.mp4
如何通过消息段正确的发送gif图片?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing how File.photo(bytes), File.animation(bytes), and File.animation(("xxxx.gif", bytes)) are handled by the Telegram adapter. Check the resulting upload type, playback behavior, and filename; done means a GIF sent through a message segment remains a GIF rather than becoming a static image, document, or MP4.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- api
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100