koishi-plugin-ets2-tools-tmp 1.1.5 → 1.2.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.
Files changed (2) hide show
  1. package/lib/index.js +14 -38
  2. package/package.json +1 -1
package/lib/index.js CHANGED
@@ -204,48 +204,12 @@ class ActivityService {
204
204
  return `检查完成!\n车队平台今日活动: ${this.todayActivities.length} 个\nTMP今日参与活动: ${this.todayTMPEvents.length} 个`;
205
205
  });
206
206
 
207
- this.ctx.command("活动DEBUG", "查看插件调试信息")
208
- .action(() => this.getDebugInfo());
209
-
210
207
  this.ctx.command("重置数据", "手动重置今日活动数据")
211
208
  .action(() => {
212
209
  this.logger.debug("手动执行数据重置命令");
213
210
  this.resetDailyData();
214
211
  return "✅ 今日活动数据已重置完成!";
215
212
  });
216
-
217
- this.ctx.command("测试无活动通知", "手动测试发送无活动通知")
218
- .action(async () => {
219
- this.logger.debug("手动执行无活动通知测试命令");
220
- await this.checkAndSendNoActivityNotification(true);
221
- return "✅ 无活动通知测试完成!";
222
- });
223
-
224
- this.ctx.command("检查活动状态变化", "手动检查活动状态变化")
225
- .action(async () => {
226
- this.logger.debug("手动执行活动状态变化检查命令");
227
- await this.checkActivityStatusChange();
228
- return "✅ 活动状态变化检查完成!";
229
- });
230
- }
231
-
232
- getDebugInfo() {
233
- let startRemindersSent = 0;
234
- for (const reminderKey of this.sentReminders) {
235
- if (reminderKey.endsWith('_started')) {
236
- startRemindersSent++;
237
- }
238
- }
239
-
240
- return `📊 TMP-BOT 插件调试信息:\n` +
241
- `• 今日活动: ${this.todayActivities.length} 个\n` +
242
- `• TMP活动: ${this.todayTMPEvents.length} 个\n` +
243
- `• 已发送提醒: ${this.sentReminders.size} 个\n` +
244
- ` - 活动开始提醒: ${startRemindersSent} 个\n` +
245
- `• 无活动通知: ${this.sentNoActivityNotification ? "已发送" : "未发送"}\n` +
246
- `• 活跃定时器: ${this.timers.length} 个\n` +
247
- `• 调试模式: ${this.cfg.debugMode ? "✅ 开启" : "❌ 关闭"}\n` +
248
- `• 日志选项: API=${this.cfg.logApiResponses ? "✅" : "❌"}, 定时=${this.cfg.logTimingDetails ? "✅" : "❌"}, 匹配=${this.cfg.logActivityMatching ? "✅" : "❌"}, 消息=${this.cfg.logMessageSending ? "✅" : "❌"}`;
249
213
  }
250
214
 
251
215
  setupDailyTasks() {
@@ -755,42 +719,54 @@ class ActivityService {
755
719
 
756
720
  function registerBaseCommands(ctx, cfg) {
757
721
  ctx.command('查询 <tmpId>')
722
+ .usage("查询TMP玩家信息")
758
723
  .action(async ({ session }, tmpId) => await commands.tmpQuery(ctx, cfg, session, tmpId));
759
724
 
760
725
  ctx.command('美卡服务器')
726
+ .usage("查询美国卡车模拟器TMP服务器信息")
761
727
  .action(async () => await commands.tmpServer(ctx, cfg, 'ATS'));
762
728
 
763
729
  ctx.command('欧卡服务器')
730
+ .usage("查询欧洲卡车模拟2TMP服务器信息")
764
731
  .action(async () => await commands.tmpServer(ctx, cfg, 'ETS2'));
765
732
 
766
733
  ctx.command('绑定 <tmpId>')
734
+ .usage("绑定TmpId")
767
735
  .action(async ({ session }, tmpId) => await commands.tmpBind(ctx, cfg, session, tmpId));
768
736
 
769
737
  ctx.command('路况 <serverName>')
738
+ .usage("查询欧洲卡车模拟2服务器路况")
739
+ .example("路况 - s1")
770
740
  .action(async ({ session }, serverName) => await commands.tmpTraffic(ctx, cfg, serverName));
771
741
 
772
742
  ctx.command('定位 <tmpId>')
743
+ .usage("定位玩家线上位置")
773
744
  .action(async ({ session }, tmpId) => await commands.tmpPosition(ctx, cfg, session, tmpId));
774
745
 
775
746
  ctx.command('tmp版本')
747
+ .usage("查询TruckersMP支持的游戏版本")
776
748
  .action(async () => await commands.tmpVersion(ctx));
777
749
 
778
750
  ctx.command('地图dlc价格')
751
+ .usage("查询欧洲卡车模拟2地图dlc价格")
779
752
  .action(async ({ session }) => await commands.tmpDlcMap(ctx, session));
780
753
 
781
754
  ctx.command('里程排行榜')
755
+ .usage("查询欧洲卡车模拟2里程排行榜")
782
756
  .action(async ({ session }) => await commands.tmpMileageRanking(ctx, session, MileageRankingType.total));
783
757
 
784
758
  ctx.command('今日里程排行榜')
759
+ .usage("查询欧洲卡车模拟2今日里程排行榜")
785
760
  .action(async ({ session }) => await commands.tmpMileageRanking(ctx, session, MileageRankingType.today));
786
761
 
787
762
  ctx.command('vtc查询 <vtcid>')
763
+ .usage("查询TruckersMP VTC信息")
788
764
  .action(async ({ session }, vtcid) => await commands.tmpVtc(ctx, cfg, session, vtcid));
789
765
 
790
766
  ctx.command(`重置密码 [targetTeamId:string]`, "重置欧卡车队平台密码")
791
767
  .usage("重置自己的密码,或管理员重置指定teamId的密码")
792
- .example(`重置密码new - 重置自己的密码`)
793
- .example(`重置密码new 123 - 管理员重置指定teamId的密码`)
768
+ .example(`重置密码 - 重置自己的密码`)
769
+ .example(`重置密码 - 管理员重置指定teamId的密码`)
794
770
  .action(async ({ session }, targetTeamId) => await commands.resetPassword(ctx, cfg, session, targetTeamId));
795
771
 
796
772
  ctx.command(`查询积分 [targetQQ:string]`, "查询欧卡车队平台积分")
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "koishi-plugin-ets2-tools-tmp",
3
3
  "description": "欧卡2 TMP在线查询、车队平台查询及活动提醒",
4
- "version": "1.1.5",
4
+ "version": "1.2.1",
5
5
  "contributors": [
6
6
  "opwop <slhp1013@qq.com>",
7
7
  "bot_actions <168329908@qq.com>"