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/database.d.ts CHANGED
@@ -20,6 +20,7 @@ export interface LoginBili {
20
20
  id: number;
21
21
  bili_cookies: string;
22
22
  bili_refresh_token: string;
23
+ dynamic_group_id: string;
23
24
  }
24
25
  export declare const name = "Database";
25
26
  export declare function apply(ctx: Context): void;
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
  }
@@ -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
@@ -9,6 +9,7 @@ declare module 'koishi' {
9
9
  export interface Config {
10
10
  require: {};
11
11
  key: string;
12
+ platform: 'qq' | 'qqguild' | 'onebot' | 'red' | 'telegram' | 'satori' | 'chronocat' | 'lark';
12
13
  master: {};
13
14
  basicSettings: {};
14
15
  unlockSubLimits: boolean;
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 (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
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: '请记得使用Auth插件创建超级管理员账号,没有权限将无法使用该插件提供的指令。'
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": "1.3.7",
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.17.5"
27
+ "koishi": "^4.18.7"
28
28
  },
29
29
  "dependencies": {
30
- "axios": "^1.7.7",
31
- "axios-cookiejar-support": "^5.0.3",
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.12.0",
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.12.0",
46
- "globals": "^15.11.0",
45
+ "eslint": "^9.20.0",
46
+ "globals": "^15.14.0",
47
47
  "koishi-plugin-puppeteer": "^3.9.0",
48
- "typescript-eslint": "^7.18.0"
48
+ "typescript-eslint": "^7.18.1-alpha.3"
49
49
  },
50
50
  "koishi": {
51
51
  "service": {
package/readme.md CHANGED
@@ -177,6 +177,8 @@
177
177
  - ver 1.3.6 现在基本设置中的userAgent选项为必填项,当因风控订阅失败时会提示更换UA,优化直播人气显示
178
178
  - ver 1.3.7 新增设置项:插件重启后是否进行直播推送。优化直播人气显示
179
179
 
180
+ - ver 2.0.0-alpha.0 重构:对动态订阅进行了重构,优化了订阅流程
181
+
180
182
  ## 交流群
181
183
 
182
184
  801338523 使用问题或bug都可以在群里提出