koishi-plugin-bilibili-notify 3.0.0-alpha.0 → 3.0.0-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.
- package/lib/blive.d.ts +2 -3
- package/lib/blive.js +7 -14
- package/lib/comRegister.d.ts +24 -26
- package/lib/comRegister.js +373 -257
- package/lib/generateImg.js +2 -2
- package/lib/index.d.ts +2 -1
- package/lib/index.js +8 -1
- package/package.json +1 -1
- package/readme.md +1 -0
package/lib/generateImg.js
CHANGED
|
@@ -1455,8 +1455,8 @@ class GenerateImg extends koishi_1.Service {
|
|
|
1455
1455
|
const seconds = differenceInSeconds % 60;
|
|
1456
1456
|
// 返回格式化的字符串
|
|
1457
1457
|
return days ?
|
|
1458
|
-
`${days} 天 ${hours}小时${minutes.toString().padStart(2, '0')}
|
|
1459
|
-
`${hours}小时${minutes.toString().padStart(2, '0')}
|
|
1458
|
+
`${days} 天 ${hours}小时${minutes.toString().padStart(2, '0')}分钟${seconds.toString().padStart(2, '0')}秒` :
|
|
1459
|
+
`${hours}小时${minutes.toString().padStart(2, '0')}分钟${seconds.toString().padStart(2, '0')}秒`;
|
|
1460
1460
|
}
|
|
1461
1461
|
unixTimestampToString(timestamp) {
|
|
1462
1462
|
const date = new Date(timestamp * 1000);
|
package/lib/index.d.ts
CHANGED
|
@@ -25,7 +25,6 @@ export interface Config {
|
|
|
25
25
|
channelId: string;
|
|
26
26
|
dynamic: boolean;
|
|
27
27
|
live: boolean;
|
|
28
|
-
liveDanmaku: boolean;
|
|
29
28
|
atAll: boolean;
|
|
30
29
|
}>;
|
|
31
30
|
platform: string;
|
|
@@ -36,6 +35,8 @@ export interface Config {
|
|
|
36
35
|
dynamicCheckNumber: number;
|
|
37
36
|
dynamicLoopTime: '1分钟' | '2分钟' | '3分钟' | '5分钟' | '10分钟' | '20分钟';
|
|
38
37
|
live: {};
|
|
38
|
+
changeMasterInfoApi: boolean;
|
|
39
|
+
liveStartAtAll: boolean;
|
|
39
40
|
restartPush: boolean;
|
|
40
41
|
pushTime: number;
|
|
41
42
|
danmakuPushTime: number;
|
package/lib/index.js
CHANGED
|
@@ -104,7 +104,6 @@ exports.Config = koishi_1.Schema.object({
|
|
|
104
104
|
channelId: koishi_1.Schema.string().description('频道/群组号'),
|
|
105
105
|
dynamic: koishi_1.Schema.boolean().description('该频道/群组是否推送动态信息'),
|
|
106
106
|
live: koishi_1.Schema.boolean().description('该频道/群组是否推送直播通知'),
|
|
107
|
-
liveDanmaku: koishi_1.Schema.boolean().description('该频道/群组是否推送弹幕消息'),
|
|
108
107
|
atAll: koishi_1.Schema.boolean().description('推送开播通知时是否艾特全体成员')
|
|
109
108
|
})).description('频道/群组信息'),
|
|
110
109
|
platform: koishi_1.Schema.string().description('推送平台')
|
|
@@ -126,6 +125,12 @@ exports.Config = koishi_1.Schema.object({
|
|
|
126
125
|
.default('2分钟')
|
|
127
126
|
.description('设定多久检测一次动态。若需动态的时效性,可以设置为1分钟。若订阅的UP主经常在短时间内连着发多条动态应该将该值提高,否则会出现动态漏推送和晚推送的问题,默认值为2分钟'),
|
|
128
127
|
live: koishi_1.Schema.object({}).description('直播推送设置'),
|
|
128
|
+
changeMasterInfoApi: koishi_1.Schema.boolean()
|
|
129
|
+
.default(false)
|
|
130
|
+
.description('是否切换获取主播信息API,在遇到错误getMasterInfo()时可以尝试切换'),
|
|
131
|
+
liveStartAtAll: koishi_1.Schema.boolean()
|
|
132
|
+
.default(false)
|
|
133
|
+
.description('直播开始时艾特全体成员,默认关闭'),
|
|
129
134
|
restartPush: koishi_1.Schema.boolean()
|
|
130
135
|
.default(true)
|
|
131
136
|
.description('插件重启后,如果订阅的主播正在直播,是否进行一次推送,默认开启'),
|
|
@@ -311,6 +316,8 @@ class ServerManager extends koishi_1.Service {
|
|
|
311
316
|
master: globalConfig.master,
|
|
312
317
|
unlockSubLimits: globalConfig.unlockSubLimits,
|
|
313
318
|
automaticResend: globalConfig.automaticResend,
|
|
319
|
+
changeMasterInfoApi: globalConfig.changeMasterInfoApi,
|
|
320
|
+
liveStartAtAll: globalConfig.liveStartAtAll,
|
|
314
321
|
restartPush: globalConfig.restartPush,
|
|
315
322
|
pushTime: globalConfig.pushTime,
|
|
316
323
|
customLiveStart: globalConfig.customLiveStart,
|
package/package.json
CHANGED