koishi-plugin-bilibili-notify 1.2.14 → 1.2.15

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/database.js CHANGED
@@ -1,7 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.name = void 0;
4
- exports.apply = apply;
3
+ exports.apply = exports.name = void 0;
5
4
  exports.name = 'Database';
6
5
  function apply(ctx) {
7
6
  // 新增LoginBili表
@@ -23,3 +22,4 @@ function apply(ctx) {
23
22
  time: 'timestamp'
24
23
  }, { autoInc: true });
25
24
  }
25
+ exports.apply = apply;
@@ -1,3 +1,4 @@
1
+ /// <reference types="node" />
1
2
  import { Context, Schema, Service } from "koishi";
2
3
  declare module 'koishi' {
3
4
  interface Context {
@@ -43,6 +44,7 @@ declare namespace GenerateImg {
43
44
  cardColorEnd: string;
44
45
  enableLargeFont: boolean;
45
46
  font: string;
47
+ hideDesc: boolean;
46
48
  }
47
49
  const Config: Schema<Config>;
48
50
  }
@@ -180,7 +180,7 @@ class GenerateImg extends koishi_1.Service {
180
180
  <span class="broadcast-message">${userData.info.uname}${titleStatus}</span>
181
181
  </div>
182
182
  </div>
183
- <p class="card-text">${data.description ? data.description : '这个主播很懒,什么都简介都没写'}</p>
183
+ ${this.giConfig.hideDesc ? '' : `<p class="card-text">${data.description ? data.description : '这个主播很懒,什么都简介都没写'}</p>`}
184
184
  <p class="card-link">
185
185
  <span>${liveTime}</span>
186
186
  <span>分区名称:${data.area_name}</span>
@@ -1385,7 +1385,8 @@ class GenerateImg extends koishi_1.Service {
1385
1385
  cardColorStart: koishi_1.Schema.string(),
1386
1386
  cardColorEnd: koishi_1.Schema.string(),
1387
1387
  enableLargeFont: koishi_1.Schema.boolean(),
1388
- font: koishi_1.Schema.string()
1388
+ font: koishi_1.Schema.string(),
1389
+ hideDesc: koishi_1.Schema.boolean()
1389
1390
  });
1390
1391
  })(GenerateImg || (GenerateImg = {}));
1391
1392
  exports.default = GenerateImg;
package/lib/index.d.ts CHANGED
@@ -23,6 +23,7 @@ export interface Config {
23
23
  liveStartAtAll: boolean;
24
24
  customLiveStart: string;
25
25
  customLiveEnd: string;
26
+ hideDesc: boolean;
26
27
  style: {};
27
28
  removeBorder: boolean;
28
29
  cardColorStart: string;
package/lib/index.js CHANGED
@@ -26,8 +26,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
26
26
  return (mod && mod.__esModule) ? mod : { "default": mod };
27
27
  };
28
28
  Object.defineProperty(exports, "__esModule", { value: true });
29
- exports.Config = exports.name = exports.inject = void 0;
30
- exports.apply = apply;
29
+ exports.apply = exports.Config = exports.name = exports.inject = void 0;
31
30
  const koishi_1 = require("koishi");
32
31
  // import plugins
33
32
  // import Authority from './authority'
@@ -52,7 +51,6 @@ exports.Config = koishi_1.Schema.object({
52
51
  enable: koishi_1.Schema.boolean()
53
52
  .default(false)
54
53
  .description('是否开启主人账号功能,如果您的机器人没有私聊权限请不要开启此功能。开启后如果机器人运行错误会向您进行报告')
55
- .experimental()
56
54
  }).description('主人账号'),
57
55
  koishi_1.Schema.union([
58
56
  koishi_1.Schema.object({
@@ -110,6 +108,10 @@ exports.Config = koishi_1.Schema.object({
110
108
  customLiveEnd: koishi_1.Schema.string()
111
109
  .default('-name下播啦,本次直播了-time')
112
110
  .description('自定义下播提示语,-name代表UP昵称,-time代表开播时长。例如-name下播啦,本次直播了-time,会发送为xxxUP下播啦,直播时长为xx小时xx分钟xx秒'),
111
+ hideDesc: koishi_1.Schema.boolean()
112
+ .default(false)
113
+ .description('是否隐藏UP主直播间简介,开启后推送的直播卡片将不再展示简介')
114
+ .experimental(),
113
115
  style: koishi_1.Schema.object({}).description('美化设置'),
114
116
  removeBorder: koishi_1.Schema.boolean()
115
117
  .default(false)
@@ -247,6 +249,7 @@ class ServerManager extends koishi_1.Service {
247
249
  removeBorder: globalConfig.removeBorder,
248
250
  cardColorStart: globalConfig.cardColorStart,
249
251
  cardColorEnd: globalConfig.cardColorEnd,
252
+ hideDesc: globalConfig.hideDesc,
250
253
  enableLargeFont: globalConfig.enableLargeFont,
251
254
  font: globalConfig.font
252
255
  });
@@ -344,3 +347,4 @@ function apply(ctx, config) {
344
347
  }
345
348
  });
346
349
  }
350
+ exports.apply = apply;
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.2.14",
4
+ "version": "1.2.15",
5
5
  "contributors": [
6
6
  "Akokko <admin@akokko.com>"
7
7
  ],
package/readme.md CHANGED
@@ -158,6 +158,7 @@
158
158
  - ver 1.2.12 新增动态错误处理
159
159
  - ver 1.2.13 现已支持调试模式,目前支持对动态的调试。需要调试模式可在控制台中开启
160
160
  - ver 1.2.14 优化调试模式输出,直播推送卡片添加分区信息
161
+ - ver 1.2.15 新增直播推送卡片简介隐藏选项
161
162
 
162
163
  ## 交流群
163
164