koishi-plugin-bilibili-notify 1.3.7 → 2.0.0-alpha.0
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/biliAPI.d.ts +8 -0
- package/lib/biliAPI.js +115 -0
- package/lib/comRegister.d.ts +25 -30
- package/lib/comRegister.js +391 -727
- package/lib/database.d.ts +1 -0
- package/lib/database.js +7 -6
- package/lib/generateImg.d.ts +2 -2
- package/lib/index.d.ts +1 -0
- package/lib/index.js +23 -8
- package/package.json +8 -8
- package/readme.md +2 -0
package/lib/database.d.ts
CHANGED
package/lib/database.js
CHANGED
|
@@ -4,12 +4,6 @@ exports.name = void 0;
|
|
|
4
4
|
exports.apply = apply;
|
|
5
5
|
exports.name = 'Database';
|
|
6
6
|
function apply(ctx) {
|
|
7
|
-
// 新增LoginBili表
|
|
8
|
-
ctx.model.extend('loginBili', {
|
|
9
|
-
id: 'unsigned',
|
|
10
|
-
bili_cookies: 'text',
|
|
11
|
-
bili_refresh_token: 'text'
|
|
12
|
-
});
|
|
13
7
|
// 新增Bilibili表
|
|
14
8
|
ctx.model.extend('bilibili', {
|
|
15
9
|
id: 'unsigned',
|
|
@@ -22,4 +16,11 @@ function apply(ctx) {
|
|
|
22
16
|
platform: 'string',
|
|
23
17
|
time: 'timestamp'
|
|
24
18
|
}, { autoInc: true });
|
|
19
|
+
// 新增LoginBili表
|
|
20
|
+
ctx.model.extend('loginBili', {
|
|
21
|
+
id: 'unsigned',
|
|
22
|
+
bili_cookies: 'text',
|
|
23
|
+
bili_refresh_token: 'text',
|
|
24
|
+
dynamic_group_id: 'string'
|
|
25
|
+
});
|
|
25
26
|
}
|
package/lib/generateImg.d.ts
CHANGED
|
@@ -9,14 +9,14 @@ declare class GenerateImg extends Service {
|
|
|
9
9
|
giConfig: GenerateImg.Config;
|
|
10
10
|
constructor(ctx: Context, config: GenerateImg.Config);
|
|
11
11
|
generateLiveImg(data: any, username: string, userface: string, liveStatus: number): Promise<{
|
|
12
|
-
buffer: Buffer
|
|
12
|
+
buffer: Buffer<ArrayBufferLike>;
|
|
13
13
|
pic?: undefined;
|
|
14
14
|
} | {
|
|
15
15
|
pic: string;
|
|
16
16
|
buffer?: undefined;
|
|
17
17
|
}>;
|
|
18
18
|
generateDynamicImg(data: any): Promise<{
|
|
19
|
-
buffer: Buffer
|
|
19
|
+
buffer: Buffer<ArrayBufferLike>;
|
|
20
20
|
link: string;
|
|
21
21
|
pic?: undefined;
|
|
22
22
|
} | {
|
package/lib/index.d.ts
CHANGED
package/lib/index.js
CHANGED
|
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
15
15
|
}) : function(o, v) {
|
|
16
16
|
o["default"] = v;
|
|
17
17
|
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
};
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
25
35
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
36
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
37
|
};
|
|
@@ -47,6 +57,10 @@ exports.Config = koishi_1.Schema.object({
|
|
|
47
57
|
.role('secret')
|
|
48
58
|
.required()
|
|
49
59
|
.description('请输入一个32位小写字母的十六进制密钥(例如:9b8db7ae562b9864efefe06289cc5530),使用此密钥将你的B站登录信息存储在数据库中,请一定保存好此密钥。如果你忘记了此密钥,必须重新登录。你可以自行生成,或到这个网站生成:https://www.sexauth.com/'),
|
|
60
|
+
platform: koishi_1.Schema.union(['qq', 'qqguild', 'onebot', 'red', 'telegram', 'satori', 'chronocat', 'lark'])
|
|
61
|
+
.role('')
|
|
62
|
+
.default('qq')
|
|
63
|
+
.description('请选择你的机器人平台,目前支持QQ、QQ群、OneBot、RedBot、Telegram、Satori、ChronoCat、Lark。从2.0版本开始,只能在一个平台下使用本插件'),
|
|
50
64
|
master: koishi_1.Schema.intersect([
|
|
51
65
|
koishi_1.Schema.object({
|
|
52
66
|
enable: koishi_1.Schema.boolean()
|
|
@@ -279,6 +293,7 @@ class ServerManager extends koishi_1.Service {
|
|
|
279
293
|
});
|
|
280
294
|
// CR = ComRegister
|
|
281
295
|
const cr = this.ctx.plugin(comRegister_1.default, {
|
|
296
|
+
platform: globalConfig.platform,
|
|
282
297
|
master: globalConfig.master,
|
|
283
298
|
unlockSubLimits: globalConfig.unlockSubLimits,
|
|
284
299
|
automaticResend: globalConfig.automaticResend,
|
|
@@ -349,7 +364,7 @@ function apply(ctx, config) {
|
|
|
349
364
|
globalConfig = config;
|
|
350
365
|
// 设置提示
|
|
351
366
|
ctx.notifier.create({
|
|
352
|
-
content: '
|
|
367
|
+
content: '请使用Auth插件创建超级管理员账号,没有权限将无法使用该插件提供的指令。'
|
|
353
368
|
});
|
|
354
369
|
if (config.unlockSubLimits) { // 用户允许订阅超过三个用户
|
|
355
370
|
// 设置警告
|
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": "
|
|
4
|
+
"version": "2.0.0-alpha.0",
|
|
5
5
|
"contributors": [
|
|
6
6
|
"Akokko <admin@akokko.com>"
|
|
7
7
|
],
|
|
@@ -24,11 +24,11 @@
|
|
|
24
24
|
"bilibili"
|
|
25
25
|
],
|
|
26
26
|
"peerDependencies": {
|
|
27
|
-
"koishi": "^4.
|
|
27
|
+
"koishi": "^4.18.7"
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"axios": "^1.7.
|
|
31
|
-
"axios-cookiejar-support": "^5.0.
|
|
30
|
+
"axios": "^1.7.9",
|
|
31
|
+
"axios-cookiejar-support": "^5.0.5",
|
|
32
32
|
"jimp": "^1.6.0",
|
|
33
33
|
"jsdom": "^24.1.3",
|
|
34
34
|
"luxon": "^3.5.0",
|
|
@@ -37,15 +37,15 @@
|
|
|
37
37
|
"tough-cookie": "^4.1.4"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
|
-
"@eslint/js": "^9.
|
|
40
|
+
"@eslint/js": "^9.20.0",
|
|
41
41
|
"@types/luxon": "^3.4.2",
|
|
42
42
|
"@types/md5": "^2.3.5",
|
|
43
43
|
"@types/qrcode": "^1.5.5",
|
|
44
44
|
"@types/tough-cookie": "^4.0.5",
|
|
45
|
-
"eslint": "^9.
|
|
46
|
-
"globals": "^15.
|
|
45
|
+
"eslint": "^9.20.0",
|
|
46
|
+
"globals": "^15.14.0",
|
|
47
47
|
"koishi-plugin-puppeteer": "^3.9.0",
|
|
48
|
-
"typescript-eslint": "^7.18.
|
|
48
|
+
"typescript-eslint": "^7.18.1-alpha.3"
|
|
49
49
|
},
|
|
50
50
|
"koishi": {
|
|
51
51
|
"service": {
|