npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

koishi-plugin-tmp-activity-reminder

v0.0.1

Published

TMP活动提醒插件 - 为TMP车队提供智能活动管理功能,基于备长碳的车队平台1.0

Readme

koishi-plugin-tmp-activity-reminder

npm

TMP活动提醒插件

一个专为卡车模拟器车队设计的智能活动管理插件,支持自动从车队平台和TruckersMP API获取活动信息,并在QQ群组中发送提醒消息。

功能特性

🎯 核心功能

  • 双数据源支持: 同时从车队平台和TruckersMP API获取活动数据
  • 智能提醒: 在活动开始前指定时间发送提醒消息
  • 档位检查: 自动检查活动档位上传状态并提醒管理
  • 多群组支持: 分别配置管理群和主群,发送不同类型的消息

⚙️ 配置灵活

  • 数据源选择: 可独立配置服务器、起点、终点的信息来源
  • 定时任务: 自定义活动检查和信息发送时间
  • 消息模板: 支持变量的自定义消息模板
  • 提醒时间: 可配置多个活动开始前提醒时间点

🔧 开发者功能

  • 详细日志: 多级别的日志记录选项
  • 调试模式: 完整的调试信息输出
  • API监控: 记录API请求和响应详情
  • 性能监控: 记录定时任务执行情况

安装配置

1. 基本配置

API配置

  • 使用HTTPS协议: 选择是否使用HTTPS
  • 车队平台URL: 您的车队平台地址(不包含协议)
  • 车队平台TOKEN: API访问令牌
  • VTC ID: 您在TruckersMP的VTC ID

管理群配置

  • 活动检查时间: 检查活动档位状态的时间(HH:mm格式)
  • 信息发送时间: 发送档位提醒的时间(HH:mm格式)
  • 管理群组ID: 接收管理提醒的群组ID列表

2. 数据源配置

为以下信息选择数据来源(车队平台API或TMP API):

  • 服务器信息
  • 起点信息
  • 终点信息

还可配置是否显示活动横幅。

3. 消息配置

管理群消息

  • 档位已上传消息: 当活动档已上传时显示的消息
  • 档位未上传消息: 当活动档未上传时的提醒消息

主群配置

  • 主群群号: 接收活动提醒的群组ID列表
  • 活动提醒消息模板: 支持以下变量:
    • {name}: 活动名称
    • {server}: 服务器名称
    • {startingPoint}: 起点位置
    • {terminalPoint}: 终点位置
    • {distance}: 距离
    • {banner}: 活动横幅(如果启用)
    • {timeLeft}: 剩余时间(分钟)
  • 活动提醒时间: 活动开始前多少分钟发送提醒

4. 开发者选项

启用以下日志记录功能用于调试:

  • 调试模式: 启用详细调试日志
  • 记录API响应: 记录API请求和响应详情
  • 记录定时任务: 记录定时任务执行详情
  • 记录活动匹配: 记录活动数据匹配过程
  • 记录消息发送: 记录消息发送详情

使用方法

自动功能

插件会自动执行以下任务:

  • 每日凌晨2点重置数据
  • 在配置的时间检查活动数据
  • 发送档位状态提醒到管理群
  • 发送活动开始提醒到主群

手动命令

活动查询

活动查询

手动检查今日活动数据,返回活动数量统计。

活动DEBUG

活动DEBUG

查看插件当前的调试信息,包括数据状态和配置。

重置数据

重置数据

手动重置今日的活动数据和提醒记录。

消息变量

在活动提醒消息模板中可使用以下变量:

| 变量名 | 说明 | 示例 | |--------|------|------| | {name} | 活动名称 | 周末联运活动 | | {server} | 服务器名称 | 欧服一区 | | {startingPoint} | 起点位置 | 柏林 - 德国 | | {terminalPoint} | 终点位置 | 巴黎 - 法国 | | {distance} | 距离 | 1200 | | {banner} | 活动横幅URL | https://example.com/banner.jpg | | {timeLeft} | 剩余时间(分钟) | 60 |

技术支持

如果遇到问题:

  1. 首先启用调试模式查看详细日志
  2. 检查API配置是否正确
  3. 确认群组ID和权限设置
  4. 查看定时任务是否正常执行

版本信息

  • 支持平台: Koishi
  • 依赖: HTTP请求、定时任务
  • 适配器: 支持主流聊天平台(除邮件适配器外)

活动查询

text 手动检查今日活动数据,返回活动数量统计。

活动DEBUG

活动DEBUG

text 查看插件当前的调试信息,包括数据状态和配置。

重置数据

重置数据

text 手动重置今日的活动数据和提醒记录。

消息变量

在活动提醒消息模板中可使用以下变量:

| 变量名 | 说明 | 示例 | |--------|------|------| | {name} | 活动名称 | 周末联运活动 | | {server} | 服务器名称 | 欧服一区 | | {startingPoint} | 起点位置 | 柏林 - 德国 | | {terminalPoint} | 终点位置 | 巴黎 - 法国 | | {distance} | 距离 | 1200 | | {banner} | 活动横幅URL | https://example.com/banner.jpg | | {timeLeft} | 剩余时间(分钟) | 60 |

技术支持

如果遇到问题:

  1. 首先启用调试模式查看详细日志
  2. 检查API配置是否正确
  3. 确认群组ID和权限设置
  4. 查看定时任务是否正常执行

版本信息

  • 支持平台: Koishi
  • 依赖: HTTP请求、定时任务
  • 适配器: 支持主流聊天平台(除邮件适配器外)