koishi-plugin-bilibili-notify 3.2.4 → 3.2.5-alpha.1

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.
Files changed (62) hide show
  1. package/lib/biliAPI-BB6Ih4EM.mjs +659 -0
  2. package/lib/biliAPI-GF2e2-2V.js +664 -0
  3. package/lib/biliAPI.d.mts +82 -0
  4. package/lib/biliAPI.d.ts +75 -70
  5. package/lib/biliAPI.js +5 -762
  6. package/lib/biliAPI.mjs +4 -0
  7. package/lib/blive-BBVUYbxX.js +43 -0
  8. package/lib/blive-CyC_0-9A.mjs +37 -0
  9. package/lib/blive.d.mts +19 -0
  10. package/lib/blive.d.ts +15 -12
  11. package/lib/blive.js +4 -59
  12. package/lib/blive.mjs +3 -0
  13. package/lib/chunk-CrFLpmCJ.js +67 -0
  14. package/lib/chunk-DBmNgn_A.mjs +40 -0
  15. package/lib/comRegister-CcqOpkwB.mjs +1421 -0
  16. package/lib/comRegister-t7UnYFig.js +1426 -0
  17. package/lib/comRegister.d.mts +109 -0
  18. package/lib/comRegister.d.ts +103 -100
  19. package/lib/comRegister.js +6 -1896
  20. package/lib/comRegister.mjs +5 -0
  21. package/lib/database-4f9U--Ji.mjs +20 -0
  22. package/lib/database-Ct2yIdxk.js +37 -0
  23. package/lib/database-Do3O9MDA.d.mts +18 -0
  24. package/lib/database-KWDs372o.d.ts +18 -0
  25. package/lib/database.d.mts +2 -0
  26. package/lib/database.d.ts +2 -14
  27. package/lib/database.js +5 -14
  28. package/lib/database.mjs +3 -0
  29. package/lib/font/HYZhengYuan-75W.js +5 -0
  30. package/lib/font/HYZhengYuan-75W.mjs +5 -0
  31. package/lib/generateImg-E9JeFpQX.js +92628 -0
  32. package/lib/generateImg-zwzMYjw6.mjs +92623 -0
  33. package/lib/generateImg.d.mts +65 -0
  34. package/lib/generateImg.d.ts +59 -46
  35. package/lib/generateImg.js +4 -1504
  36. package/lib/generateImg.mjs +4 -0
  37. package/lib/img/arrow.js +5 -0
  38. package/lib/img/arrow.mjs +5 -0
  39. package/lib/index-DeGUe4jM.d.mts +265 -0
  40. package/lib/index-MJKYbMf7.d.ts +265 -0
  41. package/lib/index.d.mts +73 -0
  42. package/lib/index.d.ts +65 -62
  43. package/lib/index.js +296 -394
  44. package/lib/index.mjs +300 -0
  45. package/lib/page/0.mjs +0 -0
  46. package/lib/type/index.d.mts +2 -0
  47. package/lib/type/index.d.ts +2 -262
  48. package/lib/type/index.js +5 -18
  49. package/lib/type/index.mjs +3 -0
  50. package/lib/type-C5ZxPrgY.mjs +19 -0
  51. package/lib/type-WjCy4YMc.js +31 -0
  52. package/lib/utils/index.d.mts +15 -0
  53. package/lib/utils/index.d.ts +8 -6
  54. package/lib/utils/index.js +6 -102
  55. package/lib/utils/index.mjs +3 -0
  56. package/lib/utils-BoaYrSvG.js +79 -0
  57. package/lib/utils-C95cnBJG.mjs +61 -0
  58. package/package.json +16 -11
  59. package/readme.md +12 -2
  60. package/lib/img/arrow.png +0 -0
  61. /package/lib/{font/HYZhengYuan-75W.ttf → assets/HYZhengYuan-75W-CAgMN3FH.ttf} +0 -0
  62. /package/lib/page/{0.html → 0.js} +0 -0
@@ -0,0 +1,109 @@
1
+ import { LoginBili } from "./database-Do3O9MDA.mjs";
2
+ import { LiveStatus, LiveType, MasterInfo, PushType, Result, SubItem, SubManager, Target } from "./index-DeGUe4jM.mjs";
3
+ import { Bot, Context, FlatPick, Logger, Schema } from "koishi";
4
+ import { CronJob } from "cron";
5
+ import { Notifier } from "@koishijs/plugin-notifier";
6
+
7
+ //#region src/comRegister.d.ts
8
+ declare class ComRegister {
9
+ static inject: string[];
10
+ qqRelatedBotList: Array<string>;
11
+ logger: Logger;
12
+ config: ComRegister.Config;
13
+ loginTimer: () => void;
14
+ num: number;
15
+ rebootCount: number;
16
+ subNotifier: Notifier;
17
+ ctx: Context;
18
+ subManager: SubManager;
19
+ dynamicTimelineManager: Map<string, number>;
20
+ liveStatusManager: Map<string, LiveStatus>;
21
+ loginDBData: FlatPick<LoginBili, "dynamic_group_id">;
22
+ privateBot: Bot<Context>;
23
+ dynamicJob: CronJob;
24
+ liveJob: CronJob;
25
+ constructor(ctx: Context, config: ComRegister.Config);
26
+ init(config: ComRegister.Config): Promise<void>;
27
+ initManager(): void;
28
+ getBot(pf: string, selfId?: string): Bot<Context, any>;
29
+ sendPrivateMsg(content: string): Promise<void>;
30
+ sendPrivateMsgAndRebootService(): Promise<void>;
31
+ sendPrivateMsgAndStopService(): Promise<void>;
32
+ sendMessageWithRetry(bot: Bot<Context>, channelId: string, content: any): Promise<void>;
33
+ getGroupsThatMeetCriteria(targets: Target, type: PushType): string[];
34
+ broadcastToTargets(targets: Target, content: any, type: PushType): Promise<void>;
35
+ dynamicDetect(): (...args: any[]) => void;
36
+ debug_dynamicDetect(): (...args: any[]) => void;
37
+ useMasterInfo(uid: string, masterInfo: MasterInfo, liveType: LiveType): Promise<MasterInfo>;
38
+ useLiveRoomInfo(roomId: string): Promise<any>;
39
+ sendLiveNotifyCard(liveType: LiveType, followerDisplay: string, liveInfo: {
40
+ liveRoomInfo: any;
41
+ masterInfo: MasterInfo;
42
+ cardStyle: SubItem["card"];
43
+ }, target: Target, liveNotifyMsg: string): Promise<void>;
44
+ liveDetectWithListener(roomId: string, target: Target, cardStyle: SubItem["card"]): Promise<void>;
45
+ liveDetectWithAPI(): Promise<(...args: any[]) => void>;
46
+ subShow(): string;
47
+ updateSubNotifier(): void;
48
+ checkIfLoginInfoIsLoaded(): Promise<unknown>;
49
+ subUserInBili(mid: string): Promise<Result>;
50
+ loadSubFromConfig(subs: ComRegister.Config["sub"]): Promise<Result>;
51
+ checkIfDynamicDetectIsNeeded(): void;
52
+ checkIfLiveDetectIsNeeded(): void;
53
+ enableDynamicDetect(): void;
54
+ enableLiveDetect(): Promise<void>;
55
+ checkIfIsLogin(): Promise<boolean>;
56
+ }
57
+ declare namespace ComRegister {
58
+ interface Config {
59
+ sub: Array<{
60
+ uid: string;
61
+ dynamic: boolean;
62
+ live: boolean;
63
+ target: Array<{
64
+ channelArr: Array<{
65
+ channelId: string;
66
+ dynamic: boolean;
67
+ live: boolean;
68
+ liveGuardBuy: boolean;
69
+ atAll: boolean;
70
+ bot: string;
71
+ }>;
72
+ platform: string;
73
+ }>;
74
+ card: {
75
+ enable: boolean;
76
+ cardColorStart: string;
77
+ cardColorEnd: string;
78
+ cardBasePlateColor: string;
79
+ cardBasePlateBorder: string;
80
+ };
81
+ }>;
82
+ master: {
83
+ enable: boolean;
84
+ platform: string;
85
+ masterAccount: string;
86
+ masterAccountGuildId: string;
87
+ };
88
+ liveDetectType: string;
89
+ restartPush: boolean;
90
+ pushTime: number;
91
+ pushImgsInDynamic: boolean;
92
+ liveLoopTime: number;
93
+ customLiveStart: string;
94
+ customLive: string;
95
+ customLiveEnd: string;
96
+ dynamicUrl: boolean;
97
+ dynamicVideoUrlToBV: boolean;
98
+ filter: {
99
+ enable: boolean;
100
+ notify: boolean;
101
+ regex: string;
102
+ keywords: Array<string>;
103
+ };
104
+ dynamicDebugMode: boolean;
105
+ }
106
+ const Config: Schema<Config>;
107
+ }
108
+ //#endregion
109
+ export { ComRegister as default };
@@ -1,106 +1,109 @@
1
- import { type Bot, type Context, type FlatPick, type Logger, Schema } from "koishi";
2
- import type { Notifier } from "@koishijs/plugin-notifier";
3
- import type { LoginBili } from "./database";
1
+ import { LoginBili } from "./database-KWDs372o.js";
2
+ import { LiveStatus, LiveType, MasterInfo, PushType, Result, SubItem, SubManager, Target } from "./index-MJKYbMf7.js";
3
+ import { Bot, Context, FlatPick, Logger, Schema } from "koishi";
4
+ import { Notifier } from "@koishijs/plugin-notifier";
4
5
  import { CronJob } from "cron";
5
- import { type LiveStatus, LiveType, type MasterInfo, PushType, type Result, type SubItem, type SubManager, type Target } from "./type";
6
+
7
+ //#region src/comRegister.d.ts
6
8
  declare class ComRegister {
7
- static inject: string[];
8
- qqRelatedBotList: Array<string>;
9
- logger: Logger;
10
- config: ComRegister.Config;
11
- loginTimer: () => void;
12
- num: number;
13
- rebootCount: number;
14
- subNotifier: Notifier;
15
- ctx: Context;
16
- subManager: SubManager;
17
- dynamicTimelineManager: Map<string, number>;
18
- liveStatusManager: Map<string, LiveStatus>;
19
- loginDBData: FlatPick<LoginBili, "dynamic_group_id">;
20
- privateBot: Bot<Context>;
21
- dynamicJob: CronJob;
22
- liveJob: CronJob;
23
- constructor(ctx: Context, config: ComRegister.Config);
24
- init(config: ComRegister.Config): Promise<void>;
25
- initManager(): void;
26
- getBot(pf: string, selfId?: string): Bot<Context, any>;
27
- sendPrivateMsg(content: string): Promise<void>;
28
- sendPrivateMsgAndRebootService(): Promise<void>;
29
- sendPrivateMsgAndStopService(): Promise<void>;
30
- sendMessageWithRetry(bot: Bot<Context>, channelId: string, content: any): Promise<void>;
31
- getGroupsThatMeetCriteria(targets: Target, type: PushType): string[];
32
- broadcastToTargets(targets: Target, content: any, type: PushType): Promise<void>;
33
- dynamicDetect(): (...args: any[]) => void;
34
- debug_dynamicDetect(): (...args: any[]) => void;
35
- useMasterInfo(uid: string, masterInfo: MasterInfo, liveType: LiveType): Promise<MasterInfo>;
36
- useLiveRoomInfo(roomId: string): Promise<any>;
37
- sendLiveNotifyCard(liveType: LiveType, followerDisplay: string, liveInfo: {
38
- liveRoomInfo: any;
39
- masterInfo: MasterInfo;
40
- cardStyle: SubItem["card"];
41
- }, target: Target, liveNotifyMsg: string): Promise<void>;
42
- liveDetectWithListener(roomId: string, target: Target, cardStyle: SubItem["card"]): Promise<void>;
43
- liveDetectWithAPI(): Promise<(...args: any[]) => void>;
44
- subShow(): string;
45
- updateSubNotifier(): void;
46
- checkIfLoginInfoIsLoaded(): Promise<unknown>;
47
- subUserInBili(mid: string): Promise<Result>;
48
- loadSubFromConfig(subs: ComRegister.Config["sub"]): Promise<Result>;
49
- checkIfDynamicDetectIsNeeded(): void;
50
- checkIfLiveDetectIsNeeded(): void;
51
- enableDynamicDetect(): void;
52
- enableLiveDetect(): Promise<void>;
53
- checkIfIsLogin(): Promise<boolean>;
9
+ static inject: string[];
10
+ qqRelatedBotList: Array<string>;
11
+ logger: Logger;
12
+ config: ComRegister.Config;
13
+ loginTimer: () => void;
14
+ num: number;
15
+ rebootCount: number;
16
+ subNotifier: Notifier;
17
+ ctx: Context;
18
+ subManager: SubManager;
19
+ dynamicTimelineManager: Map<string, number>;
20
+ liveStatusManager: Map<string, LiveStatus>;
21
+ loginDBData: FlatPick<LoginBili, "dynamic_group_id">;
22
+ privateBot: Bot<Context>;
23
+ dynamicJob: CronJob;
24
+ liveJob: CronJob;
25
+ constructor(ctx: Context, config: ComRegister.Config);
26
+ init(config: ComRegister.Config): Promise<void>;
27
+ initManager(): void;
28
+ getBot(pf: string, selfId?: string): Bot<Context, any>;
29
+ sendPrivateMsg(content: string): Promise<void>;
30
+ sendPrivateMsgAndRebootService(): Promise<void>;
31
+ sendPrivateMsgAndStopService(): Promise<void>;
32
+ sendMessageWithRetry(bot: Bot<Context>, channelId: string, content: any): Promise<void>;
33
+ getGroupsThatMeetCriteria(targets: Target, type: PushType): string[];
34
+ broadcastToTargets(targets: Target, content: any, type: PushType): Promise<void>;
35
+ dynamicDetect(): (...args: any[]) => void;
36
+ debug_dynamicDetect(): (...args: any[]) => void;
37
+ useMasterInfo(uid: string, masterInfo: MasterInfo, liveType: LiveType): Promise<MasterInfo>;
38
+ useLiveRoomInfo(roomId: string): Promise<any>;
39
+ sendLiveNotifyCard(liveType: LiveType, followerDisplay: string, liveInfo: {
40
+ liveRoomInfo: any;
41
+ masterInfo: MasterInfo;
42
+ cardStyle: SubItem["card"];
43
+ }, target: Target, liveNotifyMsg: string): Promise<void>;
44
+ liveDetectWithListener(roomId: string, target: Target, cardStyle: SubItem["card"]): Promise<void>;
45
+ liveDetectWithAPI(): Promise<(...args: any[]) => void>;
46
+ subShow(): string;
47
+ updateSubNotifier(): void;
48
+ checkIfLoginInfoIsLoaded(): Promise<unknown>;
49
+ subUserInBili(mid: string): Promise<Result>;
50
+ loadSubFromConfig(subs: ComRegister.Config["sub"]): Promise<Result>;
51
+ checkIfDynamicDetectIsNeeded(): void;
52
+ checkIfLiveDetectIsNeeded(): void;
53
+ enableDynamicDetect(): void;
54
+ enableLiveDetect(): Promise<void>;
55
+ checkIfIsLogin(): Promise<boolean>;
54
56
  }
55
57
  declare namespace ComRegister {
56
- interface Config {
57
- sub: Array<{
58
- uid: string;
59
- dynamic: boolean;
60
- live: boolean;
61
- target: Array<{
62
- channelArr: Array<{
63
- channelId: string;
64
- dynamic: boolean;
65
- live: boolean;
66
- liveGuardBuy: boolean;
67
- atAll: boolean;
68
- bot: string;
69
- }>;
70
- platform: string;
71
- }>;
72
- card: {
73
- enable: boolean;
74
- cardColorStart: string;
75
- cardColorEnd: string;
76
- cardBasePlateColor: string;
77
- cardBasePlateBorder: string;
78
- };
58
+ interface Config {
59
+ sub: Array<{
60
+ uid: string;
61
+ dynamic: boolean;
62
+ live: boolean;
63
+ target: Array<{
64
+ channelArr: Array<{
65
+ channelId: string;
66
+ dynamic: boolean;
67
+ live: boolean;
68
+ liveGuardBuy: boolean;
69
+ atAll: boolean;
70
+ bot: string;
79
71
  }>;
80
- master: {
81
- enable: boolean;
82
- platform: string;
83
- masterAccount: string;
84
- masterAccountGuildId: string;
85
- };
86
- liveDetectType: string;
87
- restartPush: boolean;
88
- pushTime: number;
89
- pushImgsInDynamic: boolean;
90
- liveLoopTime: number;
91
- customLiveStart: string;
92
- customLive: string;
93
- customLiveEnd: string;
94
- dynamicUrl: boolean;
95
- dynamicVideoUrlToBV: boolean;
96
- filter: {
97
- enable: boolean;
98
- notify: boolean;
99
- regex: string;
100
- keywords: Array<string>;
101
- };
102
- dynamicDebugMode: boolean;
103
- }
104
- const Config: Schema<Config>;
72
+ platform: string;
73
+ }>;
74
+ card: {
75
+ enable: boolean;
76
+ cardColorStart: string;
77
+ cardColorEnd: string;
78
+ cardBasePlateColor: string;
79
+ cardBasePlateBorder: string;
80
+ };
81
+ }>;
82
+ master: {
83
+ enable: boolean;
84
+ platform: string;
85
+ masterAccount: string;
86
+ masterAccountGuildId: string;
87
+ };
88
+ liveDetectType: string;
89
+ restartPush: boolean;
90
+ pushTime: number;
91
+ pushImgsInDynamic: boolean;
92
+ liveLoopTime: number;
93
+ customLiveStart: string;
94
+ customLive: string;
95
+ customLiveEnd: string;
96
+ dynamicUrl: boolean;
97
+ dynamicVideoUrlToBV: boolean;
98
+ filter: {
99
+ enable: boolean;
100
+ notify: boolean;
101
+ regex: string;
102
+ keywords: Array<string>;
103
+ };
104
+ dynamicDebugMode: boolean;
105
+ }
106
+ const Config: Schema<Config>;
105
107
  }
106
- export default ComRegister;
108
+ //#endregion
109
+ export { ComRegister as default };