mirror of
https://github.com/FloatTech/ZeroBot-Plugin.git
synced 2025-12-19 22:00:11 +08:00
24 lines
615 B
Go
24 lines
615 B
Go
package shadiao
|
|
|
|
import (
|
|
zero "github.com/wdvxdr1123/ZeroBot"
|
|
"github.com/wdvxdr1123/ZeroBot/message"
|
|
"github.com/wdvxdr1123/ZeroBot/utils/helper"
|
|
|
|
"github.com/FloatTech/ZeroBot-Plugin/utils/web"
|
|
)
|
|
|
|
func init() {
|
|
engine.OnFullMatch("来碗毒鸡汤").SetBlock(true).SetPriority(prio).Handle(func(ctx *zero.Ctx) {
|
|
if !limit.Load(ctx.Event.GroupID).Acquire() {
|
|
return
|
|
}
|
|
data, err := web.ReqWith(duURL, "GET", duReferer, ua)
|
|
if err != nil {
|
|
ctx.SendChain(message.Text("ERROR:", err))
|
|
return
|
|
}
|
|
ctx.SendChain(message.Reply(ctx.Event.MessageID), message.Text(helper.BytesToString(data)))
|
|
})
|
|
}
|