koishi-plugin-cocoyyy-console 1.0.6 → 1.0.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.
Files changed (2) hide show
  1. package/lib/index.js +9 -0
  2. package/package.json +1 -1
package/lib/index.js CHANGED
@@ -372,6 +372,7 @@ function registerMenuCommands(ctx, connected, functionConfig) {
372
372
  if (!connected) return;
373
373
  if (!is_at_bot(session)) return;
374
374
  }).action(async ({ session }, ...args) => {
375
+ if (!is_at_bot(session)) return;
375
376
  const command = args?.[0];
376
377
  return getMenuList(command, functionConfig);
377
378
  });
@@ -674,6 +675,7 @@ function registerTagCommands(ctx, connected, savePath2) {
674
675
  if (!connected) return;
675
676
  if (!is_at_bot(session)) return;
676
677
  }).action(async ({ session }, ...args) => {
678
+ if (!is_at_bot(session)) return;
677
679
  const tag = args?.[0];
678
680
  if (!tag) return "请提供正确格式,如:@bot maketag [标签]";
679
681
  let exec = await createorUpdateTag(tag, session.guildId, savePath2);
@@ -685,6 +687,7 @@ function registerTagCommands(ctx, connected, savePath2) {
685
687
  if (!connected) return;
686
688
  if (!is_at_bot(session)) return;
687
689
  }).action(async ({ session }, ...args) => {
690
+ if (!is_at_bot(session)) return;
688
691
  const tag = args?.[0];
689
692
  const img = args?.[1];
690
693
  if (!tag || !img) return "请提供正确格式,如:@bot add [标签] [图片]";
@@ -697,6 +700,7 @@ function registerTagCommands(ctx, connected, savePath2) {
697
700
  if (!connected) return;
698
701
  if (!is_at_bot(session)) return;
699
702
  }).action(async ({ session }, ...args) => {
703
+ if (!is_at_bot(session)) return;
700
704
  const tag = args?.[0];
701
705
  if (!tag) return "请提供正确格式,如:@bot get [标签]";
702
706
  let exec = await randomImgByTag(tag, session.guildId);
@@ -709,6 +713,7 @@ function registerTagCommands(ctx, connected, savePath2) {
709
713
  if (!connected) return;
710
714
  if (!is_at_bot(session)) return;
711
715
  }).action(async ({ session }, ...args) => {
716
+ if (!is_at_bot(session)) return;
712
717
  const tag = args?.[0];
713
718
  const alia = args?.[1];
714
719
  if (!tag || !alia) return "请提供正确格式,如:@bot bind [标签] [别名]";
@@ -721,6 +726,7 @@ function registerTagCommands(ctx, connected, savePath2) {
721
726
  if (!connected) return;
722
727
  if (!is_at_bot(session)) return;
723
728
  }).action(async ({ session }, ...args) => {
729
+ if (!is_at_bot(session)) return;
724
730
  const tag = args?.[0];
725
731
  const alia = args?.[1];
726
732
  if (!tag || !alia) return "请提供正确格式,如:@bot unbind [标签] [别名]";
@@ -733,6 +739,7 @@ function registerTagCommands(ctx, connected, savePath2) {
733
739
  if (!connected) return;
734
740
  if (!is_at_bot(session)) return;
735
741
  }).action(async ({ session }, ...args) => {
742
+ if (!is_at_bot(session)) return;
736
743
  const tag = args?.[0];
737
744
  if (!tag) return "请提供正确格式,如:@bot addstart [标签]";
738
745
  let exec = await startBatchAddImg(ctx, tag, session, savePath2);
@@ -744,6 +751,7 @@ function registerTagCommands(ctx, connected, savePath2) {
744
751
  if (!connected) return;
745
752
  if (!is_at_bot(session)) return;
746
753
  }).action(async ({ session }) => {
754
+ if (!is_at_bot(session)) return;
747
755
  let exec = await endBatchAddImg(ctx, session);
748
756
  if (!exec.result)
749
757
  return exec.error;
@@ -753,6 +761,7 @@ function registerTagCommands(ctx, connected, savePath2) {
753
761
  if (!connected) return;
754
762
  if (!is_at_bot(session)) return;
755
763
  }).action(async ({ session }) => {
764
+ if (!is_at_bot(session)) return;
756
765
  let exec = await getTagList(session.guildId);
757
766
  if (exec == null)
758
767
  return `查询失败`;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "koishi-plugin-cocoyyy-console",
3
3
  "description": "for self using, function console",
4
- "version": "1.0.6",
4
+ "version": "1.0.7",
5
5
  "main": "lib/index.js",
6
6
  "typings": "lib/index.d.ts",
7
7
  "contributors": [