koishi-plugin-bilibili-notify 1.2.3-rc.2 → 1.2.3-rc.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.
@@ -765,6 +765,40 @@ class ComRegister {
765
765
  await this.sendMsg(['ALL'], bot, 'Hello World');
766
766
  await session.send('已向机器人加入的所有群发送了消息');
767
767
  });
768
+ biliCom
769
+ .subcommand('.list', '获取机器人加入的所有群组', { hidden: true })
770
+ .usage('获取当前机器人加入的所有群聊')
771
+ .example('bili list 获取当前机器人加入的所有群聊')
772
+ .action(async ({ session }) => {
773
+ let bot;
774
+ switch (session.event.platform) {
775
+ case 'qq':
776
+ bot = this.qqBot;
777
+ break;
778
+ case 'qqguild':
779
+ bot = this.qqguildBot;
780
+ break;
781
+ case 'onebot':
782
+ bot = this.oneBot;
783
+ break;
784
+ case 'red':
785
+ bot = this.redBot;
786
+ break;
787
+ case 'telegram':
788
+ bot = this.telegramBot;
789
+ break;
790
+ case 'satori':
791
+ bot = this.satoriBot;
792
+ break;
793
+ case 'chronocat':
794
+ bot = this.chronocatBot;
795
+ break;
796
+ default: {
797
+ return `暂不支持该平台`;
798
+ }
799
+ }
800
+ (await bot.getGuildList()).data.map(item => this.logger.info(`已加入${item.id}`));
801
+ });
768
802
  }
769
803
  async sendPrivateMsg(bot, content) {
770
804
  if (this.config.master.enable) {
@@ -901,8 +935,8 @@ class ComRegister {
901
935
  // 判断是否需要推送所有机器人加入的群
902
936
  if (targets[0] === 'ALL') {
903
937
  // 获取所有guild
904
- for (let guild in (await bot.getGuildList()).data) {
905
- sendArr.push(guild);
938
+ for (let guild of (await bot.getGuildList()).data) {
939
+ sendArr.push(guild.id);
906
940
  }
907
941
  }
908
942
  else {
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.3-rc.2",
4
+ "version": "1.2.3-rc.3",
5
5
  "contributors": [
6
6
  "Akokko <admin@akokko.com>"
7
7
  ],
package/readme.md CHANGED
@@ -126,7 +126,8 @@
126
126
  - ver 1.2.3-beta.2 功能测试版本,请跳过该版本
127
127
  - ver 1.2.3-rc.0 现已支持向机器人加入的所有群发送推送消息(仅支持Q群,实验性),修复预约动态无法正常推送的bug
128
128
  - ver 1.2.3-rc.1 修复 `1.2.3-rc.0` 出现的重复推送bug
129
- - ver 1.2.3-rc.2 修复推送所有群失败的bug
129
+ - ver 1.2.3-rc.2 bug测试版本,请跳过
130
+ - ver 1.2.3-rc.3 修复推送所有群失败的bug
130
131
 
131
132
  ## 交流群
132
133