@hieuzest/koishi-plugin-riichi-city 0.4.5 → 0.4.6

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 +2 -2
  2. package/package.json +1 -1
package/lib/index.js CHANGED
@@ -453,7 +453,7 @@ var RiichiCity = class extends import_koishi3.Service {
453
453
  }
454
454
  api;
455
455
  async getAccountsByNicknames(nicknames, query = true) {
456
- const curtime = Date.now() / 1e3;
456
+ const curtime = Math.floor(Date.now() / 1e3);
457
457
  const list = await this.ctx.database.select("riichi-city.accounts", { nickname: nicknames }).groupBy("nickname", {
458
458
  accounts: /* @__PURE__ */ __name((row) => import_koishi3.$.array(import_koishi3.$.object(row)), "accounts")
459
459
  }).execute();
@@ -478,7 +478,7 @@ var RiichiCity = class extends import_koishi3.Service {
478
478
  return res;
479
479
  }
480
480
  async setAccounts(accounts) {
481
- const curtime = Date.now() / 1e3;
481
+ const curtime = Math.floor(Date.now() / 1e3);
482
482
  accounts = accounts.map((x) => ({ updatedAt: curtime, ...x }));
483
483
  await this.ctx.database.upsert("riichi-city.accounts", accounts);
484
484
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@hieuzest/koishi-plugin-riichi-city",
3
3
  "description": "",
4
- "version": "0.4.5",
4
+ "version": "0.4.6",
5
5
  "main": "lib/index.js",
6
6
  "typings": "lib/index.d.ts",
7
7
  "files": [