koishi-plugin-bilibili-notify 1.0.10-alpha.0 → 1.0.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/HYZhengYuan-55W.ttf +0 -0
- package/lib/biliAPI.js +10 -10
- package/lib/comRegister.d.ts +2 -2
- package/lib/comRegister.js +84 -46
- package/lib/generateImg.d.ts +1 -0
- package/lib/generateImg.js +662 -327
- package/lib/index.d.ts +1 -0
- package/lib/index.js +20 -3
- package/package.json +7 -5
- package/readme.md +1 -0
- package/lib/authority.d.ts +0 -5
- package/lib/authority.js +0 -12
package/lib/index.d.ts
CHANGED
package/lib/index.js
CHANGED
|
@@ -75,10 +75,11 @@ exports.Config = koishi_1.Schema.object({
|
|
|
75
75
|
enable: koishi_1.Schema.boolean()
|
|
76
76
|
.default(false)
|
|
77
77
|
.description('是否开启动态关键字屏蔽功能')
|
|
78
|
+
.experimental()
|
|
78
79
|
}).description('屏蔽设置'),
|
|
79
80
|
koishi_1.Schema.union([
|
|
80
81
|
koishi_1.Schema.object({
|
|
81
|
-
enable: koishi_1.Schema.const(true).required(),
|
|
82
|
+
enable: koishi_1.Schema.const(true).required().experimental(),
|
|
82
83
|
regex: koishi_1.Schema.string()
|
|
83
84
|
.description('正则表达式屏蔽'),
|
|
84
85
|
keywords: koishi_1.Schema.array(String)
|
|
@@ -99,6 +100,9 @@ exports.Config = koishi_1.Schema.object({
|
|
|
99
100
|
.pattern(/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/)
|
|
100
101
|
.default('#F9CCDF')
|
|
101
102
|
.description('推送卡片的结束渐变背景色,请填入16进制颜色代码,参考网站:https://colorate.azurewebsites.net/'),
|
|
103
|
+
enableLargeFont: koishi_1.Schema.boolean()
|
|
104
|
+
.default(false)
|
|
105
|
+
.description('是否开启动态推送卡片大字体模式,默认为小字体。小字体更漂亮,但阅读比较吃力,大字体更易阅读,但相对没这么好看'),
|
|
102
106
|
font: koishi_1.Schema.string()
|
|
103
107
|
.description('推送卡片的字体样式,如果你想用你自己的字体可以在此填写,例如:Microsoft YaHei')
|
|
104
108
|
});
|
|
@@ -145,11 +149,24 @@ function apply(ctx, config) {
|
|
|
145
149
|
ctx.plugin(Database);
|
|
146
150
|
// Regist server
|
|
147
151
|
ctx.plugin(wbi_1.default, { key: config.key });
|
|
148
|
-
ctx.plugin(generateImg_1.default, {
|
|
152
|
+
ctx.plugin(generateImg_1.default, {
|
|
153
|
+
renderType,
|
|
154
|
+
filter: config.filter,
|
|
155
|
+
removeBorder: config.removeBorder,
|
|
156
|
+
cardColorStart: config.cardColorStart,
|
|
157
|
+
cardColorEnd: config.cardColorEnd,
|
|
158
|
+
enableLargeFont: config.enableLargeFont,
|
|
159
|
+
font: config.font
|
|
160
|
+
});
|
|
149
161
|
ctx.plugin(biliAPI_1.default);
|
|
150
162
|
// load plugin
|
|
151
163
|
// ctx.plugin(Authority)
|
|
152
|
-
ctx.plugin(comRegister_1.default, {
|
|
164
|
+
ctx.plugin(comRegister_1.default, {
|
|
165
|
+
unlockSubLimits: config.unlockSubLimits,
|
|
166
|
+
pushTime: config.pushTime,
|
|
167
|
+
dynamicCheckNumber: config.dynamicCheckNumber,
|
|
168
|
+
dynamicLoopTime
|
|
169
|
+
});
|
|
153
170
|
// 当用户输入“恶魔兔,启动!”时,执行 help 指令
|
|
154
171
|
ctx.middleware((session, next) => {
|
|
155
172
|
if (session.content === '恶魔兔,启动!') {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "koishi-plugin-bilibili-notify",
|
|
3
3
|
"description": "Koishi bilibili notify plugin",
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.12",
|
|
5
5
|
"contributors": [
|
|
6
6
|
"Akokko <admin@akokko.com>"
|
|
7
7
|
],
|
|
@@ -17,7 +17,6 @@
|
|
|
17
17
|
"url": "git+https://github.com/Akokk0/koishi-plugin-bilibili-notify"
|
|
18
18
|
},
|
|
19
19
|
"homepage": "https://www.npmjs.com/package/koishi-plugin-bilibili-notify",
|
|
20
|
-
"scripts": {},
|
|
21
20
|
"keywords": [
|
|
22
21
|
"chatbot",
|
|
23
22
|
"koishi",
|
|
@@ -25,16 +24,19 @@
|
|
|
25
24
|
"bilibili"
|
|
26
25
|
],
|
|
27
26
|
"peerDependencies": {
|
|
28
|
-
"koishi": "^4.16.
|
|
27
|
+
"koishi": "^4.16.6"
|
|
29
28
|
},
|
|
30
29
|
"dependencies": {
|
|
31
|
-
"axios-cookiejar-support": "^
|
|
32
|
-
"jsdom": "^
|
|
30
|
+
"axios-cookiejar-support": "^5.0.0",
|
|
31
|
+
"jsdom": "^24.0.0",
|
|
33
32
|
"md5": "^2.3.0",
|
|
34
33
|
"qrcode": "^1.5.3",
|
|
35
34
|
"tough-cookie": "^4.1.3"
|
|
36
35
|
},
|
|
37
36
|
"devDependencies": {
|
|
37
|
+
"@types/md5": "^2",
|
|
38
|
+
"@types/qrcode": "^1",
|
|
39
|
+
"@types/tough-cookie": "^4",
|
|
38
40
|
"koishi-plugin-puppeteer": "^3.7.3"
|
|
39
41
|
},
|
|
40
42
|
"koishi": {
|
package/readme.md
CHANGED
|
@@ -86,6 +86,7 @@
|
|
|
86
86
|
- ver 1.0.8 修复了取消订阅的bug
|
|
87
87
|
- ver 1.0.9 更新请求客户端header信息。优化了动态推送卡片的页面布局,增加了字体大小。提供用户开放订阅数量限制的选项,提供用户移除推送卡片边框的选项。在控制台页面增加订阅信息提示
|
|
88
88
|
- ver 1.0.10 增加对onebot的支持,添加动态关键字屏蔽功能
|
|
89
|
+
- ver 1.0.11 修复了render渲染模式下,动态重复推送的问题,修复了没有订阅时,控制台空白提示的问题。优化了视频动态缩略图显示不全的问题,优化了部分逻辑。增强容错和增加错误提示
|
|
89
90
|
|
|
90
91
|
## 感谢
|
|
91
92
|
|
package/lib/authority.d.ts
DELETED
package/lib/authority.js
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
class Authority {
|
|
4
|
-
constructor(ctx) {
|
|
5
|
-
// 授予权限
|
|
6
|
-
/* ctx.permissions.provide('telegram:admin', async (name, session) => {
|
|
7
|
-
console.log(session);
|
|
8
|
-
return session.telegram?.sender?.role === 'admin'
|
|
9
|
-
}) */
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
exports.default = Authority;
|