koishi-plugin-bilibili-notify 3.3.6 → 3.3.7

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/index.js CHANGED
@@ -70,7 +70,7 @@ const BAConfigSchema = koishi.Schema.object({
70
70
  basicSettings: koishi.Schema.object({}).description("基本设置"),
71
71
  userAgent: koishi.Schema.string().description("设置请求头User-Agen,请求出现-352时可以尝试修改,UA获取方法可参考:https://blog.csdn.net/qq_44503987/article/details/104929111"),
72
72
  subTitle: koishi.Schema.object({}).description("订阅配置"),
73
- advancedSub: koishi.Schema.boolean().default(false).description("是否开启高级订阅,若开启高级订阅,请打开该选项并下载插件 bilibili-notify-advanced-subscription"),
73
+ advancedSub: koishi.Schema.boolean().default(false).description("是否开启高级订阅,高级订阅是独立于本插件的一个专门用于订阅配置的插件,用于高度自定义订阅消息。若开启高级订阅,请打开该选项并下载插件 bilibili-notify-advanced-subscription"),
74
74
  subs: koishi.Schema.array(koishi.Schema.object({
75
75
  name: koishi.Schema.string().required().description("备注"),
76
76
  uid: koishi.Schema.string().required().description("UID和roomid"),
@@ -880,6 +880,10 @@ var ComRegister = class {
880
880
  for (const bot of this.ctx.bots) if (bot.platform === platform) bots.push(bot);
881
881
  let num = 0;
882
882
  const sendMessageByBot = async (channelId, botIndex = 0) => {
883
+ if (!bots[botIndex]) {
884
+ this.logger.warn(`${platform} 没有配置对应机器人,无法进行推送!`);
885
+ return;
886
+ }
883
887
  if (bots[botIndex].status !== koishi.Universal.Status.ONLINE) {
884
888
  this.logger.error(`${platform} 机器人未初始化完毕,无法进行推送,${retry / 1e3}秒后重试`);
885
889
  this.ctx.setTimeout(async () => {
package/lib/index.mjs CHANGED
@@ -52,7 +52,7 @@ const BAConfigSchema = Schema.object({
52
52
  basicSettings: Schema.object({}).description("基本设置"),
53
53
  userAgent: Schema.string().description("设置请求头User-Agen,请求出现-352时可以尝试修改,UA获取方法可参考:https://blog.csdn.net/qq_44503987/article/details/104929111"),
54
54
  subTitle: Schema.object({}).description("订阅配置"),
55
- advancedSub: Schema.boolean().default(false).description("是否开启高级订阅,若开启高级订阅,请打开该选项并下载插件 bilibili-notify-advanced-subscription"),
55
+ advancedSub: Schema.boolean().default(false).description("是否开启高级订阅,高级订阅是独立于本插件的一个专门用于订阅配置的插件,用于高度自定义订阅消息。若开启高级订阅,请打开该选项并下载插件 bilibili-notify-advanced-subscription"),
56
56
  subs: Schema.array(Schema.object({
57
57
  name: Schema.string().required().description("备注"),
58
58
  uid: Schema.string().required().description("UID和roomid"),
@@ -862,6 +862,10 @@ var ComRegister = class {
862
862
  for (const bot of this.ctx.bots) if (bot.platform === platform) bots.push(bot);
863
863
  let num = 0;
864
864
  const sendMessageByBot = async (channelId, botIndex = 0) => {
865
+ if (!bots[botIndex]) {
866
+ this.logger.warn(`${platform} 没有配置对应机器人,无法进行推送!`);
867
+ return;
868
+ }
865
869
  if (bots[botIndex].status !== Universal.Status.ONLINE) {
866
870
  this.logger.error(`${platform} 机器人未初始化完毕,无法进行推送,${retry / 1e3}秒后重试`);
867
871
  this.ctx.setTimeout(async () => {
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": "3.3.6",
4
+ "version": "3.3.7",
5
5
  "main": "./lib/index.js",
6
6
  "typings": "lib/index.d.ts",
7
7
  "files": [