koishi-plugin-cocoyyy-console 1.0.5 → 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.
package/lib/index.d.ts CHANGED
@@ -1,7 +1,6 @@
1
1
  import { Context, Logger, Schema } from 'koishi';
2
2
  import * as my_config from './utils/config';
3
3
  export declare const name = "cocoyyy-console";
4
- export declare const inject: string[];
5
4
  export interface Config {
6
5
  function_config?: my_config.FunctionConfig;
7
6
  mysql_config?: my_config.MysqlConfig;
package/lib/index.js CHANGED
@@ -22,7 +22,6 @@ var src_exports = {};
22
22
  __export(src_exports, {
23
23
  Config: () => Config,
24
24
  apply: () => apply,
25
- inject: () => inject,
26
25
  logger: () => logger,
27
26
  name: () => name,
28
27
  savePath: () => savePath
@@ -373,6 +372,7 @@ function registerMenuCommands(ctx, connected, functionConfig) {
373
372
  if (!connected) return;
374
373
  if (!is_at_bot(session)) return;
375
374
  }).action(async ({ session }, ...args) => {
375
+ if (!is_at_bot(session)) return;
376
376
  const command = args?.[0];
377
377
  return getMenuList(command, functionConfig);
378
378
  });
@@ -675,6 +675,7 @@ function registerTagCommands(ctx, connected, savePath2) {
675
675
  if (!connected) return;
676
676
  if (!is_at_bot(session)) return;
677
677
  }).action(async ({ session }, ...args) => {
678
+ if (!is_at_bot(session)) return;
678
679
  const tag = args?.[0];
679
680
  if (!tag) return "请提供正确格式,如:@bot maketag [标签]";
680
681
  let exec = await createorUpdateTag(tag, session.guildId, savePath2);
@@ -686,6 +687,7 @@ function registerTagCommands(ctx, connected, savePath2) {
686
687
  if (!connected) return;
687
688
  if (!is_at_bot(session)) return;
688
689
  }).action(async ({ session }, ...args) => {
690
+ if (!is_at_bot(session)) return;
689
691
  const tag = args?.[0];
690
692
  const img = args?.[1];
691
693
  if (!tag || !img) return "请提供正确格式,如:@bot add [标签] [图片]";
@@ -698,6 +700,7 @@ function registerTagCommands(ctx, connected, savePath2) {
698
700
  if (!connected) return;
699
701
  if (!is_at_bot(session)) return;
700
702
  }).action(async ({ session }, ...args) => {
703
+ if (!is_at_bot(session)) return;
701
704
  const tag = args?.[0];
702
705
  if (!tag) return "请提供正确格式,如:@bot get [标签]";
703
706
  let exec = await randomImgByTag(tag, session.guildId);
@@ -710,6 +713,7 @@ function registerTagCommands(ctx, connected, savePath2) {
710
713
  if (!connected) return;
711
714
  if (!is_at_bot(session)) return;
712
715
  }).action(async ({ session }, ...args) => {
716
+ if (!is_at_bot(session)) return;
713
717
  const tag = args?.[0];
714
718
  const alia = args?.[1];
715
719
  if (!tag || !alia) return "请提供正确格式,如:@bot bind [标签] [别名]";
@@ -722,6 +726,7 @@ function registerTagCommands(ctx, connected, savePath2) {
722
726
  if (!connected) return;
723
727
  if (!is_at_bot(session)) return;
724
728
  }).action(async ({ session }, ...args) => {
729
+ if (!is_at_bot(session)) return;
725
730
  const tag = args?.[0];
726
731
  const alia = args?.[1];
727
732
  if (!tag || !alia) return "请提供正确格式,如:@bot unbind [标签] [别名]";
@@ -734,6 +739,7 @@ function registerTagCommands(ctx, connected, savePath2) {
734
739
  if (!connected) return;
735
740
  if (!is_at_bot(session)) return;
736
741
  }).action(async ({ session }, ...args) => {
742
+ if (!is_at_bot(session)) return;
737
743
  const tag = args?.[0];
738
744
  if (!tag) return "请提供正确格式,如:@bot addstart [标签]";
739
745
  let exec = await startBatchAddImg(ctx, tag, session, savePath2);
@@ -745,6 +751,7 @@ function registerTagCommands(ctx, connected, savePath2) {
745
751
  if (!connected) return;
746
752
  if (!is_at_bot(session)) return;
747
753
  }).action(async ({ session }) => {
754
+ if (!is_at_bot(session)) return;
748
755
  let exec = await endBatchAddImg(ctx, session);
749
756
  if (!exec.result)
750
757
  return exec.error;
@@ -754,6 +761,7 @@ function registerTagCommands(ctx, connected, savePath2) {
754
761
  if (!connected) return;
755
762
  if (!is_at_bot(session)) return;
756
763
  }).action(async ({ session }) => {
764
+ if (!is_at_bot(session)) return;
757
765
  let exec = await getTagList(session.guildId);
758
766
  if (exec == null)
759
767
  return `查询失败`;
@@ -868,7 +876,6 @@ __name(registerRbqMiddleware, "registerRbqMiddleware");
868
876
 
869
877
  // src/index.ts
870
878
  var name = "cocoyyy-console";
871
- var inject = ["sequelize", "mysql2"];
872
879
  var Config = import_koishi9.Schema.object({
873
880
  function_config: FunctionConfigSchema.description("功能开关配置"),
874
881
  mysql_config: MysqlConfigSchema.description("MySQL 数据库配置"),
@@ -901,7 +908,6 @@ __name(apply, "apply");
901
908
  0 && (module.exports = {
902
909
  Config,
903
910
  apply,
904
- inject,
905
911
  logger,
906
912
  name,
907
913
  savePath
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.5",
4
+ "version": "1.0.7",
5
5
  "main": "lib/index.js",
6
6
  "typings": "lib/index.d.ts",
7
7
  "contributors": [