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.
@@ -101,13 +101,13 @@ class ComRegister {
101
101
  console.log(session);
102
102
  })
103
103
 
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
- })
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')
@@ -19,6 +19,7 @@ declare namespace GenerateImg {
19
19
  interface Config {
20
20
  cardColorStart: string;
21
21
  cardColorEnd: string;
22
+ font: string;
22
23
  }
23
24
  const Config: Schema<Config>;
24
25
  }
@@ -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
@@ -7,6 +7,7 @@ export interface Config {
7
7
  dynamicLoopTime: '1分钟' | '2分钟' | '3分钟' | '5分钟';
8
8
  cardColorStart: string;
9
9
  cardColorEnd: string;
10
+ font: string;
10
11
  key: string;
11
12
  }
12
13
  export declare const Config: Schema<Config>;
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
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "koishi-plugin-bilibili-notify",
3
3
  "description": "Koishi bilibili notify plugin",
4
- "version": "1.0.2",
4
+ "version": "1.0.3",
5
5
  "contributors": [
6
6
  "Akokko <admin@akokko.com>"
7
7
  ],
package/readme.md CHANGED
@@ -80,6 +80,7 @@
80
80
 
81
81
  ver 1.0.1 修复了一些bug,提供用户自己选择动态检测时间的选项
82
82
  ver 1.0.2 修复时间bug和字体乱码问题
83
+ ver 1.0.3 修复了一些bug,提供用户自己选择推送卡片字体样式的选项
83
84
 
84
85
  ## 感谢
85
86