koishi-plugin-ets2-tools-tmp 2.5.1 → 2.5.2

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.
@@ -78,6 +78,12 @@ module.exports = async (ctx, session, serverType, tmpId, date) => {
78
78
  endTime = lastMonth.endOf('month').format('YYYY-MM-DD HH:mm:ss');
79
79
  }
80
80
 
81
+ if (date === 'lastThreeMonths') {
82
+ const threeMonthsAgo = dayjs().subtract(3, 'month');
83
+ startTime = threeMonthsAgo.startOf('month').format('YYYY-MM-DD HH:mm:ss');
84
+ endTime = dayjs().endOf('day').format('YYYY-MM-DD HH:mm:ss');
85
+ }
86
+
81
87
  if (!startTime || !endTime) {
82
88
  return '日期传递错误';
83
89
  }
@@ -110,6 +116,9 @@ module.exports = async (ctx, session, serverType, tmpId, date) => {
110
116
  if (date === 'lastMonth') {
111
117
  return `上月暂无数据`;
112
118
  }
119
+ if (date === 'lastThreeMonths') {
120
+ return `近三个月暂无数据`;
121
+ }
113
122
  return '暂无数据';
114
123
  }
115
124
 
package/lib/index.js CHANGED
@@ -74,7 +74,7 @@ exports.Config = koishi_1.Schema.intersect([
74
74
  tmpDlcMap: koishi_1.Schema.boolean().default(true).description('是否启用DLC地图查询'),
75
75
  tmpMileageRanking: koishi_1.Schema.boolean().default(true).description('是否启用里程排行榜'),
76
76
  tmpVtc: koishi_1.Schema.boolean().default(true).description('是否启用VTC查询'),
77
- tmpFootprint: koishi_1.Schema.boolean().default(true).description('是否启用今日足迹'),
77
+ tmpFootprint: koishi_1.Schema.boolean().default(true).description('是否启用足迹查询'),
78
78
  mainSettings: koishi_1.Schema.boolean().default(false).description('是否启用车队平台积分查询功能'),
79
79
  resetPassword: koishi_1.Schema.boolean().default(false).description('是否启用车队平台重置密码功能'),
80
80
  tmpActivityService: koishi_1.Schema.boolean().default(false).description('是否启用车队活动查询'),
@@ -283,6 +283,18 @@ function registerBaseCommands(ctx, cfg) {
283
283
  .example("上月足迹p 12345")
284
284
  .action(async ({ session }, tmpId) => await commands.tmpFootprint(ctx, session, ServerType.promods, tmpId, 'lastMonth'));
285
285
 
286
+ ctx.command('近三个月足迹 [tmpId:string]')
287
+ .usage("查询ETS服务器今日足迹")
288
+ .example("近三个月足迹")
289
+ .example("近三个月足迹 12345")
290
+ .action(async ({ session }, tmpId) => await commands.tmpFootprint(ctx, session, ServerType.ets, tmpId, 'lastThreeMonths'));
291
+
292
+ ctx.command('近三个月足迹p [tmpId:string]')
293
+ .usage("查询Promods服务器今日足迹")
294
+ .example("近三个月足迹p足迹p")
295
+ .example("近三个月足迹p 12345")
296
+ .action(async ({ session }, tmpId) => await commands.tmpFootprint(ctx, session, ServerType.promods, tmpId, 'lastThreeMonths'));
297
+
286
298
  ctx.command('本月足迹 [tmpId:string]')
287
299
  .usage("查询ETS服务器今日足迹")
288
300
  .example("本月足迹")
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "koishi-plugin-ets2-tools-tmp",
3
3
  "description": "欧卡2 TruckersMP信息查询、车队平台查询及活动提醒",
4
- "version": "2.5.1",
4
+ "version": "2.5.2",
5
5
  "contributors": [
6
6
  "opwop <slhp1013@qq.com>",
7
7
  "bot_actions <168329908@qq.com>"
package/readme.md CHANGED
@@ -109,8 +109,8 @@
109
109
  | 活动查询 | 手动检查今日活动数据,返回活动数量统计 | 活动查询 |
110
110
  | 今日/昨日足迹 <tmpId> | 查看今日/昨日除p服外的足迹 | 今日/昨日足迹 123456 |
111
111
  | 今日/昨日足迹p <tmpId> | 查看今日/昨日p服的足迹 | 今日/昨日足迹p 123456 |
112
- | 本月/上月足迹 <tmpId> | 查看本月/上月除p服外的足迹 | 本月/上月足迹 123456 |
113
- | 本月/上月足迹p <tmpId> | 查看本月/上月p服的足迹 | 本月/上月足迹p 123456 |
112
+ | 本月/上月/近三个月足迹 <tmpId> | 查看本月/上月除p服外的足迹 | 本月/上月/近三个月足迹 123456 |
113
+ | 本月/上月/近三个月足迹p <tmpId> | 查看本月/上月p服的足迹 | 本月/上月/近三个月足迹p 123456 |
114
114
 
115
115
  ## 📝 使用方法
116
116