@azimiao/koishi-plugin-cafe-bot-exp 0.0.17 → 0.0.19

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
@@ -5,5 +5,8 @@ import { Context } from 'koishi';
5
5
  import { Config } from './config';
6
6
  export declare const name = "cafe-bot-exp";
7
7
  export * from "./config";
8
- export declare const inject: string[];
8
+ export declare const inject: {
9
+ required: string[];
10
+ optional: string[];
11
+ };
9
12
  export declare function apply(ctx: Context, config: Config): Promise<void>;
package/lib/index.js CHANGED
@@ -38,7 +38,7 @@ __export(src_exports, {
38
38
  module.exports = __toCommonJS(src_exports);
39
39
 
40
40
  // package.json
41
- var version = "0.0.17";
41
+ var version = "0.0.19";
42
42
 
43
43
  // src/draw/index.ts
44
44
  var draw_exports = {};
@@ -775,12 +775,16 @@ D. ${qOptions[3].s}`;
775
775
  let total = right + userQuizA.wrong;
776
776
  let percent = Math.round(userQuizA.right * 1 / total * 100);
777
777
  let comment = "继续努力吧~";
778
- if (percent >= 95) {
779
- comment = "哇,难道您就是传说中的桂皮?!";
780
- } else if (total >= 80) {
781
- comment = "离合格的桂皮只有一步之遥?!";
782
- } else if (total >= 50) {
783
- comment = "正在成为桂皮中……";
778
+ if (total >= 6) {
779
+ if (percent >= 90) {
780
+ comment = "哇,难道您就是传说中的桂皮?!";
781
+ } else if (percent >= 70) {
782
+ comment = "离合格的桂皮只有一步之遥?!";
783
+ } else if (percent >= 60) {
784
+ comment = "正在成为桂皮中……";
785
+ } else if (percent <= 25) {
786
+ comment = "开除桂皮籍!😤";
787
+ }
784
788
  }
785
789
  await argv.session?.send(`${At(argv)}你的答题数据:
786
790
  - 答题总数: ${total}
@@ -803,17 +807,21 @@ var Config4 = import_koishi7.Schema.intersect([
803
807
 
804
808
  // src/index.ts
805
809
  var name4 = "cafe-bot-exp";
806
- var inject3 = ["http", "cache", "logger", "database"];
810
+ var inject3 = {
811
+ required: ["http", "cache", "database"],
812
+ optional: ["logger"]
813
+ };
807
814
  async function apply4(ctx, config) {
808
815
  ctx.plugin(draw_exports, config);
809
816
  ctx.plugin(quiz_exports, config);
810
817
  ctx.plugin(cat_exports, config);
811
818
  ctx.command("关于", "about").action(async (argv, _) => {
812
819
  argv.session?.send(
813
- `我是运行在超级计算机『卡佩尔』上的轨迹CafeBot概念版v${version}🎉~
814
- - 我提供轨迹抽卡🎴和轨迹问答🙋‍功能
815
- - 另外我还有一些隐藏功能待你探索哦🎁
816
- 多多与我聊天吧~`
820
+ `<img src="https://www.azimiao.com/wp-content/uploads/2025/05/cafe-wide.jpg"/>
821
+ ${At(argv)}我是运行在超级计算机『卡佩尔』上的轨迹CafeBot概念版v${version}🎉~
822
+ 🔹 我提供轨迹抽卡🎴和轨迹问答🙋‍功能
823
+ 🔹 另外我还有一些隐藏功能待你探索哦🎁
824
+ 我还在成长中,多多与我聊天吧~`
817
825
  );
818
826
  });
819
827
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@azimiao/koishi-plugin-cafe-bot-exp",
3
3
  "description": "cafe bot experiment",
4
- "version": "0.0.17",
4
+ "version": "0.0.19",
5
5
  "main": "lib/index.js",
6
6
  "typings": "lib/index.d.ts",
7
7
  "repository": {
@@ -33,7 +33,8 @@
33
33
  "service": {
34
34
  "required": [
35
35
  "http",
36
- "cache"
36
+ "cache",
37
+ "database"
37
38
  ]
38
39
  },
39
40
  "locales": [