Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

✨ 添加bilibilipush和完善gif文档 #369

Merged
merged 12 commits into from
Aug 11, 2022
18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -393,6 +393,24 @@ print("run[CQ:image,file="+j["img"]+"]")

- [x] t.bilibili.com/642277677329285174 | bilibili.com/read/cv17134450 | bilibili.com/video/BV13B4y1x7pS | live.bilibili.com/22603245

</details>
<details>
<summary>b站动态、直播推送,需要配合job一起使用</summary>

`import _ "github.com/FloatTech/ZeroBot-Plugin/plugin/bilibili"`

- [x] 添加b站订阅[uid|name]

- [x] 取消b站订阅[uid|name]

- [x] 取消b站动态订阅[uid|name]

- [x] 取消b站直播订阅[uid|name]

- [x] b站推送列表

- [x] 拉取b站推送 (使用job执行定时任务------记录在"@every 10s"触发的指令)

</details>
<details>
<summary>书评</summary>
Expand Down
2 changes: 1 addition & 1 deletion plugin/bilibili/bilibili.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ func init() {
var getdb = ctxext.DoOnceOnSuccess(func(ctx *zero.Ctx) bool {
var err error
_, _ = engine.GetLazyData("bilibili.db", false)
vdb, err = initialize(engine.DataFolder() + "bilibili.db")
vdb, err = initializeVup(engine.DataFolder() + "bilibili.db")
if err != nil {
ctx.SendChain(message.Text("ERROR:", err))
return false
Expand Down
1 change: 1 addition & 0 deletions plugin/bilibili/bilibili_parse.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// Package bilibili bilibili卡片解析
package bilibili

import (
Expand Down
4 changes: 2 additions & 2 deletions plugin/bilibili/model.go → plugin/bilibili/bilibilimodel.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ func (config) TableName() string {
return "config"
}

// initialize 初始化vtb数据库
func initialize(dbpath string) (*vupdb, error) {
// initializeVup 初始化vup数据库
func initializeVup(dbpath string) (*vupdb, error) {
if _, err := os.Stat(dbpath); err != nil || os.IsNotExist(err) {
// 生成文件
f, err := os.Create(dbpath)
Expand Down
Loading