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 2
2
package dailynews
3
3
4
4
import (
5
- "github.com/FloatTech/floatbox/binary"
6
5
"github.com/FloatTech/floatbox/web"
7
6
ctrl "github.com/FloatTech/zbpctrl"
8
7
"github.com/FloatTech/zbputils/control"
9
- "github.com/tidwall/gjson"
10
8
zero "github.com/wdvxdr1123/ZeroBot"
11
9
"github.com/wdvxdr1123/ZeroBot/message"
12
10
)
13
11
14
- const api = "http ://dwz.2xb. cn/zaob "
12
+ const api = "https ://uapis. cn/api/v1/daily/news-image "
15
13
16
14
func init () {
17
15
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
28
}
31
- picURL := gjson .Get (binary .BytesToString (data ), "imageUrl" ).String ()
32
- ctx .SendChain (message .Image (picURL ))
29
+ ctx .SendChain (message .ImageBytes (data ))
33
30
})
34
31
}
You can’t perform that action at this time.
0 commit comments