koishi-plugin-xxck-1 0.2.21 → 0.2.23

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 +7 -1
  2. package/package.json +1 -1
package/lib/index.js CHANGED
@@ -1826,7 +1826,13 @@ async function doBattleAgree(ctx, session) {
1826
1826
  await ctx.database.upsert("gacha_battle_user", [w]);
1827
1827
  await ctx.database.upsert("gacha_battle_user", [l]);
1828
1828
  await ctx.database.upsert("gacha_battle_user", [p1d]);
1829
- await ctx.database.create("gacha_battle_log", { qq1: p1, qq2: p2, star, win_qq: winQQ, time: Date.now() });
1829
+ await ctx.database.upsert("gacha_battle_log", [{
1830
+ qq1: p1,
1831
+ qq2: p2,
1832
+ star,
1833
+ win_qq: winQQ,
1834
+ time: Date.now()
1835
+ }], ["qq1", "qq2", "time"]);
1830
1836
  let asset = await ctx.database.get("gacha_user_draw_count", { qq: winQQ });
1831
1837
  let vapor = asset[0]?.water_vapor || 0;
1832
1838
  await ctx.database.upsert("gacha_user_draw_count", [{ qq: winQQ, water_vapor: vapor + reward }]);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "koishi-plugin-xxck-1",
3
3
  "description": "自用(?)抽卡系统|完整指令说明见readme|建议使用skia-canvas|指令与本地化已经基本完成",
4
- "version": "0.2.21",
4
+ "version": "0.2.23",
5
5
  "main": "lib/index.js",
6
6
  "typings": "lib/index.d.ts",
7
7
  "files": [