We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e6a4dfc commit 685f7fdCopy full SHA for 685f7fd
1 file changed
plugin/bilibili/bilibili_parse.go
@@ -78,6 +78,19 @@ func init() {
78
handleLive(ctx)
79
}
80
})
81
+ en.OnRegex(`^([BV][A-Za-z0-9]+)`).SetBlock(true).Limit(limit.LimitByGroup).
82
+ Handle(func(ctx *zero.Ctx) {
83
+ u := ctx.State["regex_matched"].([]string)[0]
84
+ if !strings.Contains(u, "bilibili") {
85
+ u = "bilibili.com/video/" + u
86
+ }
87
+ var bilibiliurl string
88
+ bilibiliurl = "https://" + u
89
+ if searchVideoRe.MatchString(bilibiliurl){
90
+ ctx.State["regex_matched"] = searchVideoRe.FindStringSubmatch(bilibiliurl)
91
+ handleVideo(ctx)
92
93
+ })
94
en.OnRegex(`^(开启|打开|启用|关闭|关掉|禁用)视频总结$`, zero.AdminPermission).SetBlock(true).
95
Handle(func(ctx *zero.Ctx) {
96
gid := ctx.Event.GroupID
0 commit comments