koishi-plugin-bilibili-notify 1.2.0-rc.4 → 1.2.0-rc.5

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.
@@ -44,6 +44,12 @@ declare namespace ComRegister {
44
44
  customLiveEnd: string;
45
45
  dynamicLoopTime: number;
46
46
  dynamicCheckNumber: number;
47
+ filter: {
48
+ enable: boolean;
49
+ regex: string;
50
+ keywords: Array<string>;
51
+ notify: boolean;
52
+ };
47
53
  }
48
54
  const Config: Schema<Config>;
49
55
  }
@@ -673,7 +673,8 @@ class ComRegister {
673
673
  if (e.message === '直播开播动态,不做处理')
674
674
  break;
675
675
  if (e.message === '出现关键词,屏蔽该动态') {
676
- await this.sendMsg(guildId, bot, `UID:${uid} 发布了一条含有屏蔽关键字的动态`);
676
+ // 如果需要发送才发送
677
+ this.config.filter.notify && await this.sendMsg(guildId, bot, `UID:${uid} 发布了一条含有屏蔽关键字的动态`);
677
678
  break;
678
679
  }
679
680
  }
@@ -1167,7 +1168,13 @@ class ComRegister {
1167
1168
  customLiveStart: koishi_1.Schema.string().required(),
1168
1169
  customLiveEnd: koishi_1.Schema.string().required(),
1169
1170
  dynamicLoopTime: koishi_1.Schema.number().default(60),
1170
- dynamicCheckNumber: koishi_1.Schema.number().required()
1171
+ dynamicCheckNumber: koishi_1.Schema.number().required(),
1172
+ filter: koishi_1.Schema.object({
1173
+ enable: koishi_1.Schema.boolean(),
1174
+ regex: koishi_1.Schema.string(),
1175
+ keywords: koishi_1.Schema.array(String),
1176
+ notify: koishi_1.Schema.boolean(),
1177
+ }),
1171
1178
  });
1172
1179
  })(ComRegister || (ComRegister = {}));
1173
1180
  exports.default = ComRegister;
@@ -37,7 +37,6 @@ declare namespace GenerateImg {
37
37
  enable: boolean;
38
38
  regex: string;
39
39
  keywords: Array<string>;
40
- filter: boolean;
41
40
  };
42
41
  removeBorder: boolean;
43
42
  cardColorStart: string;
@@ -1367,7 +1367,7 @@ class GenerateImg extends koishi_1.Service {
1367
1367
  enable: koishi_1.Schema.boolean(),
1368
1368
  regex: koishi_1.Schema.string(),
1369
1369
  keywords: koishi_1.Schema.array(String),
1370
- filter: koishi_1.Schema.boolean()
1370
+ notify: koishi_1.Schema.boolean(),
1371
1371
  }),
1372
1372
  removeBorder: koishi_1.Schema.boolean(),
1373
1373
  cardColorStart: koishi_1.Schema.string(),
package/lib/index.js CHANGED
@@ -114,7 +114,9 @@ exports.Config = koishi_1.Schema.object({
114
114
  regex: koishi_1.Schema.string()
115
115
  .description('正则表达式屏蔽'),
116
116
  keywords: koishi_1.Schema.array(String)
117
- .description('关键字屏蔽,一个关键字为一项')
117
+ .description('关键字屏蔽,一个关键字为一项'),
118
+ notify: koishi_1.Schema.boolean()
119
+ .description('动态被屏蔽是否发送提示')
118
120
  }),
119
121
  koishi_1.Schema.object({})
120
122
  ])
@@ -182,12 +184,13 @@ function apply(ctx, config) {
182
184
  customLiveStart: config.customLiveStart,
183
185
  customLiveEnd: config.customLiveEnd,
184
186
  dynamicCheckNumber: config.dynamicCheckNumber,
185
- dynamicLoopTime
187
+ dynamicLoopTime,
188
+ filter: config.filter
186
189
  });
187
190
  // 当用户输入“恶魔兔,启动!”时,执行 help 指令
188
191
  ctx.middleware((session, next) => {
189
192
  if (session.content === '恶魔兔,启动!') {
190
- return session.execute('help', next);
193
+ return session.send('启动不了一点');
191
194
  }
192
195
  else {
193
196
  return next();
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.0-rc.4",
4
+ "version": "1.2.0-rc.5",
5
5
  "contributors": [
6
6
  "Akokko <admin@akokko.com>"
7
7
  ],
package/readme.md CHANGED
@@ -111,6 +111,8 @@
111
111
  - ver 1.2.0-rc.1 现已支持Telegram平台(实验性)
112
112
  - ver 1.2.0-rc.2 添加更多日志输出
113
113
  - ver 1.2.0-rc.3 针对Telegram的Bug测试版本
114
+ - ver 1.2.0-rc.4 修复了一个订阅指令的bug
115
+ - ver 1.2.0-rc.5 屏蔽动态设置新增是否发送动态被屏蔽消息的选项
114
116
 
115
117
  ## 交流群
116
118
  801338523 使用问题或bug都可以在群里提出