File tree Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Original file line number Diff line number Diff line change 22package dailynews
33
44import (
5- "github.com/FloatTech/floatbox/binary"
65 "github.com/FloatTech/floatbox/web"
76 ctrl "github.com/FloatTech/zbpctrl"
87 "github.com/FloatTech/zbputils/control"
9- "github.com/tidwall/gjson"
108 zero "github.com/wdvxdr1123/ZeroBot"
119 "github.com/wdvxdr1123/ZeroBot/message"
1210)
1311
14- const api = "http ://dwz.2xb. cn/zaob "
12+ const api = "https ://uapis. cn/api/v1/daily/news-image "
1513
1614func init () {
1715 engine := control .AutoRegister (& ctrl.Options [* zero.Ctx ]{
@@ -28,7 +26,6 @@ func init() {
2826 ctx .SendChain (message .Text ("ERROR: " , err ))
2927 return
3028 }
31- picURL := gjson .Get (binary .BytesToString (data ), "imageUrl" ).String ()
32- ctx .SendChain (message .Image (picURL ))
29+ ctx .SendChain (message .ImageBytes (data ))
3330 })
3431}
You can’t perform that action at this time.
0 commit comments