-
-
Notifications
You must be signed in to change notification settings - Fork 256
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
对于 adapter-discord 发送网络图片的简化建议 #280
Labels
Comments
你的意思是发送 embed 形式的图片吗 |
就是 segment.image |
我记得之前做过, discord 到 qq 的网络巨慢, 还可能失败 |
那就这样,先尝试发图,一旦超时就直接发链接 |
我建议加一个配置项
|
新增了一个 App 配置项
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is your feature request related to a problem? Please describe.
目前 adapter-discord 发送网络图片的方式是先下载图片,然后上传到 dc,这个过程会有些耗时,而且极容易受到网络环境影响从而发送失败。
Describe the solution you'd like
当发送网络图片时,发送一个 head 请求,如果返回的 contentType 是图片,则直接发送链接。
discord 自身会自动将图片链接转换成图片,且由此自动转的图片是不会因原链接过期而无法显示的。
此举可以从一定程度上节约时间,提高图片发送的成功率。
Describe alternatives you've considered
如果链接以 .jpg/gif/xxx 等结尾,跳过 head 请求检查媒体类型,直接发链接。(缺乏泛用性)
Additional context
The text was updated successfully, but these errors were encountered: