@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.
- package/lib/index.js +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
|
}
|