koishi-plugin-bilibili-notify 3.0.0-alpha.1 → 3.0.0-alpha.10

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.
@@ -11,6 +11,7 @@ type ChannelIdArr = Array<{
11
11
  channelId: string;
12
12
  dynamic: boolean;
13
13
  live: boolean;
14
+ liveDanmaku: boolean;
14
15
  atAll: boolean;
15
16
  }>;
16
17
  type TargetItem = {
@@ -26,7 +27,6 @@ type SubItem = {
26
27
  platform: string;
27
28
  live: boolean;
28
29
  dynamic: boolean;
29
- liveDispose: Function;
30
30
  };
31
31
  type SubManager = Array<SubItem>;
32
32
  declare class ComRegister {
@@ -38,50 +38,53 @@ declare class ComRegister {
38
38
  num: number;
39
39
  rebootCount: number;
40
40
  subNotifier: Notifier;
41
+ ctx: Context;
41
42
  subManager: SubManager;
42
43
  loginDBData: FlatPick<LoginBili, "dynamic_group_id">;
43
44
  privateBot: Bot<Context>;
44
45
  dynamicDispose: Function;
46
+ liveDispose: Function;
45
47
  sendMsgFunc: (bot: Bot<Context, any>, channelId: string, content: any) => Promise<void>;
46
48
  constructor(ctx: Context, config: ComRegister.Config);
47
- init(ctx: Context, config: ComRegister.Config): Promise<void>;
49
+ init(config: ComRegister.Config): Promise<void>;
48
50
  splitMultiPlatformStr(str: string): Target;
49
- getBot(ctx: Context, pf: string): Bot<Context, any>;
51
+ getBot(pf: string): Bot<Context, any>;
50
52
  sendPrivateMsg(content: string): Promise<void>;
51
- sendPrivateMsgAndRebootService(ctx: Context): Promise<void>;
52
- sendPrivateMsgAndStopService(ctx: Context): Promise<void>;
53
- sendMsg(ctx: Context, targets: Target, content: any, live?: boolean): Promise<void>;
54
- dynamicDetect(ctx: Context): () => Promise<void>;
55
- debug_dynamicDetect(ctx: Context): () => Promise<void>;
56
- sendLiveNotifyCard(ctx: Context, info: {
53
+ sendPrivateMsgAndRebootService(): Promise<void>;
54
+ sendPrivateMsgAndStopService(): Promise<void>;
55
+ sendMsg(targets: Target, content: any, live?: boolean): Promise<void>;
56
+ dynamicDetect(): () => Promise<void>;
57
+ debug_dynamicDetect(): () => Promise<void>;
58
+ sendLiveNotifyCard(info: {
57
59
  username: string;
58
60
  userface: string;
59
61
  target: Target;
60
62
  data: any;
61
63
  }, liveType: LiveType, liveNotifyMsg?: string): Promise<void>;
62
- useMasterInfo(ctx: Context, uid: string): Promise<{
64
+ useMasterInfo(uid: string): Promise<{
63
65
  username: string;
64
66
  userface: string;
67
+ roomId: number;
65
68
  }>;
66
- useLiveRoomInfo(ctx: Context, roomId: string): Promise<any>;
67
- liveDetectWithAPI(ctx: Context): Promise<() => Promise<void>>;
68
- liveDetectWithListener(ctx: Context, roomId: string, target: Target): void;
69
+ useLiveRoomInfo(roomId: string): Promise<any>;
70
+ liveDetectWithAPI(): Promise<() => Promise<void>>;
71
+ liveDetectWithListener(roomId: string, target: Target): Promise<void>;
69
72
  subShow(): string;
70
73
  checkIfNeedSub(liveSub: boolean, dynamicSub: boolean, session: Session, liveRoomData: any): Promise<Array<boolean>>;
71
- updateSubNotifier(ctx: Context): void;
72
- checkIfLoginInfoIsLoaded(ctx: Context): Promise<unknown>;
73
- subUserInBili(ctx: Context, mid: string): Promise<{
74
+ updateSubNotifier(): void;
75
+ checkIfLoginInfoIsLoaded(): Promise<unknown>;
76
+ subUserInBili(mid: string): Promise<{
74
77
  flag: boolean;
75
78
  msg: string;
76
79
  }>;
77
- loadSubFromConfig(ctx: Context, subs: ComRegister.Config["sub"]): Promise<void>;
78
- loadSubFromDatabase(ctx: Context): Promise<void>;
79
- checkIfDynamicDetectIsNeeded(ctx: Context): void;
80
- enableDynamicDetect(ctx: Context): void;
81
- unsubSingle(ctx: Context, id: string, type: number): string;
80
+ loadSubFromConfig(subs: ComRegister.Config["sub"]): Promise<void>;
81
+ loadSubFromDatabase(): Promise<void>;
82
+ checkIfDynamicDetectIsNeeded(): void;
83
+ enableDynamicDetect(): void;
84
+ unsubSingle(id: string, type: number): string;
82
85
  checkIfUserIsTheLastOneWhoSubDyn(): void;
83
- unsubAll(ctx: Context, uid: string): void;
84
- checkIfIsLogin(ctx: Context): Promise<boolean>;
86
+ unsubAll(uid: string): void;
87
+ checkIfIsLogin(): Promise<boolean>;
85
88
  }
86
89
  declare namespace ComRegister {
87
90
  interface Config {
@@ -94,6 +97,7 @@ declare namespace ComRegister {
94
97
  channelId: string;
95
98
  dynamic: boolean;
96
99
  live: boolean;
100
+ liveDanmaku: boolean;
97
101
  atAll: boolean;
98
102
  }>;
99
103
  platform: string;
@@ -107,7 +111,7 @@ declare namespace ComRegister {
107
111
  };
108
112
  unlockSubLimits: boolean;
109
113
  automaticResend: boolean;
110
- changeMasterInfoApi: boolean;
114
+ liveDetectMode: 'API' | 'WS';
111
115
  restartPush: boolean;
112
116
  pushTime: number;
113
117
  liveLoopTime: number;