koishi-plugin-ll-mc 3.1.15 → 3.1.16

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 +5 -1
  2. package/package.json +1 -1
package/lib/index.js CHANGED
@@ -77,6 +77,9 @@ var Config = import_koishi.Schema.intersect([
77
77
  defaultMaxDisplayCount: import_koishi.Schema.number().min(0).default(20).description("排行榜默认显示的人数。设置为 0 则显示所有。"),
78
78
  isTimeInfoSupplementEnabled: import_koishi.Schema.boolean().default(true).description("是否在排行榜标题中显示生成时间。"),
79
79
  isUserMessagePercentageVisible: import_koishi.Schema.boolean().default(false).description("是否在排行榜中显示用户的消息数占比。"),
80
+ appendRequesterToLeaderboard: import_koishi.Schema.boolean().default(true).description(
81
+ "发指令的人如果没排进前 N 名,是否仍把他追加到榜单末尾(并标 ★)。关闭后只有真正排进前 N 名才会出现。"
82
+ ),
80
83
  hiddenUserIdsInLeaderboard: import_koishi.Schema.array(String).role("table").description("全局隐藏的用户 ID 列表,在所有用户排行榜中生效。"),
81
84
  hiddenChannelIdsInLeaderboard: import_koishi.Schema.array(String).role("table").description("全局隐藏的频道 ID 列表,在群排行榜中生效。")
82
85
  }).description("排行榜设置"),
@@ -2412,7 +2415,8 @@ ${targetUserRecord[0].username}
2412
2415
  function prepareRankingData(sortedUsers, userInfo, totalCount, limit, requesterId) {
2413
2416
  const topUsers = sortedUsers.slice(0, limit);
2414
2417
  const isRequesterInTop = requesterId && topUsers.some(([userId]) => userId === requesterId);
2415
- if (requesterId && !isRequesterInTop) {
2418
+ // 官机补丁:发指令的人没进前 N 时是否仍追加。由配置 appendRequesterToLeaderboard 控制(默认开,保持原行为)。
2419
+ if (requesterId && !isRequesterInTop && config.appendRequesterToLeaderboard !== false) {
2416
2420
  const requesterData = sortedUsers.find(
2417
2421
  ([userId]) => userId === requesterId
2418
2422
  );
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "koishi-plugin-ll-mc",
3
3
  "description": "消息数量统计插件(基于 koishi-plugin-message-counter 重做,官方QQ机器人兼容)",
4
- "version": "3.1.15",
4
+ "version": "3.1.16",
5
5
  "main": "lib/index.js",
6
6
  "typings": "lib/index.d.ts",
7
7
  "files": [