We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2d1603d commit fef48e4Copy full SHA for fef48e4
1 file changed
plugin/dailynews/dailynews.go
@@ -2,16 +2,14 @@
2
package dailynews
3
4
import (
5
- "github.com/FloatTech/floatbox/binary"
6
"github.com/FloatTech/floatbox/web"
7
ctrl "github.com/FloatTech/zbpctrl"
8
"github.com/FloatTech/zbputils/control"
9
- "github.com/tidwall/gjson"
10
zero "github.com/wdvxdr1123/ZeroBot"
11
"github.com/wdvxdr1123/ZeroBot/message"
12
)
13
14
-const api = "http://dwz.2xb.cn/zaob"
+const api = "https://uapis.cn/api/v1/daily/news-image"
15
16
func init() {
17
engine := control.AutoRegister(&ctrl.Options[*zero.Ctx]{
@@ -28,7 +26,6 @@ func init() {
28
26
ctx.SendChain(message.Text("ERROR: ", err))
29
27
return
30
}
31
- picURL := gjson.Get(binary.BytesToString(data), "imageUrl").String()
32
- ctx.SendChain(message.Image(picURL))
+ ctx.SendChain(message.ImageBytes(data))
33
})
34
0 commit comments