koishi-plugin-tmp-bot 1.19.0 → 1.19.1

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.
@@ -4,6 +4,7 @@ const common = require('../util/common');
4
4
  const { ServerAliasToId, PromodsIds } = require('../util/constant');
5
5
  const evmOpenApi = require('../api/evmOpenApi');
6
6
  const guildBind = require('../database/guildBind');
7
+ const dayjs = require('dayjs');
7
8
  module.exports = async (ctx, session, serverName) => {
8
9
  if (!ctx.puppeteer) {
9
10
  return '未启用 puppeteer 服务';
@@ -28,7 +29,9 @@ module.exports = async (ctx, session, serverName) => {
28
29
  return '查询玩家信息失败,请重试';
29
30
  }
30
31
  // 查询当日历史位置数据
31
- let mapPlayerHistory = await evmOpenApi.mapPlayerHistory(ctx.http, tmpId, serverId, '2026-01-22 00:00:00', '2026-01-22 23:00:00');
32
+ const startTime = dayjs().startOf('day').format('YYYY-MM-DD HH:mm:ss');
33
+ const endTime = dayjs().endOf('day').format('YYYY-MM-DD HH:mm:ss');
34
+ let mapPlayerHistory = await evmOpenApi.mapPlayerHistory(ctx.http, tmpId, serverId, startTime, endTime);
32
35
  if (mapPlayerHistory.data.length === 0) {
33
36
  return `当日暂无数据`;
34
37
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "koishi-plugin-tmp-bot",
3
3
  "description": "欧洲卡车模拟2 TMP查询插件,不会部署的可以直接使用此机器人->QQ:3523283907",
4
- "version": "1.19.0",
4
+ "version": "1.19.1",
5
5
  "main": "lib/index.js",
6
6
  "typings": "lib/index.d.ts",
7
7
  "homepage": "https://github.com/79887143/koishi-plugin-tmp-bot",