koishi-plugin-bilibili-notify 1.0.2 → 1.0.3
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/comRegister.js +7 -7
- package/lib/generateImg.d.ts +1 -0
- package/lib/generateImg.js +4 -1
- package/lib/index.d.ts +1 -0
- package/lib/index.js +3 -1
- package/package.json +1 -1
- package/readme.md +1 -0
package/lib/comRegister.js
CHANGED
|
@@ -101,13 +101,13 @@ class ComRegister {
|
|
|
101
101
|
console.log(session);
|
|
102
102
|
})
|
|
103
103
|
|
|
104
|
-
ctx.command('test')
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
104
|
+
// ctx.command('test')
|
|
105
|
+
// .subcommand('.dynamic <uid:string>')
|
|
106
|
+
// .usage('测试动态监测')
|
|
107
|
+
// .example('test dynamic uid')
|
|
108
|
+
// .action(({ session }, uid) => {
|
|
109
|
+
// ctx.setInterval(this.test_dynamicDetect(ctx, session, uid), 30000)
|
|
110
|
+
// })
|
|
111
111
|
|
|
112
112
|
ctx.command('test')
|
|
113
113
|
.subcommand('.utc')
|
package/lib/generateImg.d.ts
CHANGED
package/lib/generateImg.js
CHANGED
|
@@ -56,6 +56,7 @@ class GenerateImg extends koishi_1.Service {
|
|
|
56
56
|
*{
|
|
57
57
|
margin: 0;
|
|
58
58
|
padding: 0;
|
|
59
|
+
font-family: "${this.config.font}", "Microsoft YaHei", "Source Han Sans", "Noto Sans CJK", sans-serif;
|
|
59
60
|
}
|
|
60
61
|
|
|
61
62
|
html {
|
|
@@ -473,6 +474,7 @@ class GenerateImg extends koishi_1.Service {
|
|
|
473
474
|
* {
|
|
474
475
|
margin: 0;
|
|
475
476
|
padding: 0;
|
|
477
|
+
font-family: "${this.config.font}", "Microsoft YaHei", "Source Han Sans", "Noto Sans CJK", sans-serif;
|
|
476
478
|
}
|
|
477
479
|
|
|
478
480
|
html {
|
|
@@ -930,7 +932,8 @@ class GenerateImg extends koishi_1.Service {
|
|
|
930
932
|
cardColorEnd: koishi_1.Schema.string()
|
|
931
933
|
.pattern(/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/)
|
|
932
934
|
.default('#F9CCDF')
|
|
933
|
-
.description('推送卡片的结束渐变背景色,请填入16进制颜色代码,参考网站:https://colorate.azurewebsites.net/')
|
|
935
|
+
.description('推送卡片的结束渐变背景色,请填入16进制颜色代码,参考网站:https://colorate.azurewebsites.net/'),
|
|
936
|
+
font: koishi_1.Schema.string()
|
|
934
937
|
});
|
|
935
938
|
})(GenerateImg || (GenerateImg = {}));
|
|
936
939
|
exports.default = GenerateImg;
|
package/lib/index.d.ts
CHANGED
package/lib/index.js
CHANGED
|
@@ -64,6 +64,8 @@ exports.Config = koishi_1.Schema.object({
|
|
|
64
64
|
.pattern(/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/)
|
|
65
65
|
.default('#F9CCDF')
|
|
66
66
|
.description('推送卡片的结束渐变背景色,请填入16进制颜色代码,参考网站:https://colorate.azurewebsites.net/'),
|
|
67
|
+
font: koishi_1.Schema.string()
|
|
68
|
+
.description('推送卡片的字体样式,如果你想用你自己的字体可以在此填写,例如:Microsoft YaHei'),
|
|
67
69
|
key: koishi_1.Schema.string()
|
|
68
70
|
.pattern(/^[0-9a-f]{32}$/)
|
|
69
71
|
.role('secret')
|
|
@@ -78,7 +80,7 @@ function apply(ctx, config) {
|
|
|
78
80
|
ctx.plugin(Database);
|
|
79
81
|
// Regist server
|
|
80
82
|
ctx.plugin(wbi_1.default, { key: config.key });
|
|
81
|
-
ctx.plugin(generateImg_1.default, { cardColorStart: config.cardColorStart, cardColorEnd: config.cardColorEnd });
|
|
83
|
+
ctx.plugin(generateImg_1.default, { cardColorStart: config.cardColorStart, cardColorEnd: config.cardColorEnd, font: config.font });
|
|
82
84
|
ctx.plugin(biliAPI_1.default);
|
|
83
85
|
// load plugin
|
|
84
86
|
// ctx.plugin(Authority)
|
package/package.json
CHANGED