kotori-plugin-penis 1.5.1 → 1.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.
Files changed (2) hide show
  1. package/lib/index.js +10 -21
  2. package/package.json +1 -1
package/lib/index.js CHANGED
@@ -1,11 +1,11 @@
1
1
  /**
2
2
  * @Package kotori-plugin-penis
3
- * @Version 1.5.0
3
+ * @Version 1.5.1
4
4
  * @Author Himeno <me@hotaru.icu>
5
5
  * @Copyright 2024-2025 Hotaru. All rights reserved.
6
6
  * @License GPL-3.0
7
7
  * @Link https://github.com/kotorijs/kotori
8
- * @Date 2026/8/2 15:59:01
8
+ * @Date 2026/8/2 21:36:18
9
9
  */
10
10
  "use strict";
11
11
  var __defProp = Object.defineProperty;
@@ -50,11 +50,7 @@ const config = import_kotori_bot.Tsu.Object({
50
50
  });
51
51
  function main(ctx, config2) {
52
52
  const getNewLength = () => config2.min + Math.floor(Math.random() * (config2.max - config2.min + 1));
53
- const getNewThickness = () => Number(
54
- (config2.minThickness * 10 + Math.random() * (config2.maxThickness * 10 - config2.minThickness * 10) / 10).toFixed(
55
- 2
56
- )
57
- );
53
+ const getNewThickness = () => Number((config2.minThickness * 10 + Math.random() * (config2.maxThickness * 10 - config2.minThickness * 10) / 10).toFixed(2));
58
54
  const getTodayPath = () => `${(/* @__PURE__ */ new Date()).getFullYear()}-${(/* @__PURE__ */ new Date()).getMonth() + 1}-${(/* @__PURE__ */ new Date()).getDay()}.json`;
59
55
  const loadTodayData = () => ctx.file.load(getTodayPath(), "json", {});
60
56
  const saveTodayData = (data) => ctx.file.save(getTodayPath(), data);
@@ -138,11 +134,7 @@ function main(ctx, config2) {
138
134
  let num = 1;
139
135
  for (const entry of entries) {
140
136
  if (num > 20) continue;
141
- list += session.format("newnew.msg.today_ranking.list", [
142
- num,
143
- entry[0].slice(session.api.adapter.identity.length),
144
- entry[1][0]
145
- ]);
137
+ list += session.format("newnew.msg.today_ranking.list", [num, entry[0].slice(session.api.adapter.identity.length), entry[1][0]]);
146
138
  num += 1;
147
139
  }
148
140
  return session.format("newnew.msg.today_ranking", [list]);
@@ -174,9 +166,8 @@ function main(ctx, config2) {
174
166
  if (senderLength === 0) return session.quick(["{1} \u4F60\u6CA1\u6709\u6B66\u5668\u554A\uFF01\u60F3\u4EC0\u4E48\u4E86\uFF01", params]);
175
167
  if (targetId === session.userId) {
176
168
  const cutFailed = Math.random() < config2.cutProbability;
177
- if (targetLength > 0 && cut) {
178
- session.quick([cutFailed ? "{1} \u4F60\u6CA1\u5FCD\u4F4F\uFF01\u793E\u4FDD\u4E86\uFF01" : "{1} \u4F60\u6210\u529F\u5BF8\u6B62\u4E86\uFF01", params]);
179
- } else if (targetLength > 0) session.quick(["{1} \u8D77\u98DE\u6210\u529F\uFF01\u72B6\u6001\u826F\u597D\uFF01", params]);
169
+ if (targetLength > 0 && cut) session.quick([cutFailed ? "{1} \u4F60\u6CA1\u5FCD\u4F4F\uFF01\u793E\u4FDD\u4E86\uFF01" : "{1} \u4F60\u6210\u529F\u5BF8\u6B62\u4E86\uFF01", params]);
170
+ else if (targetLength > 0) session.quick(["{1} \u8D77\u98DE\u6210\u529F\uFF01\u72B6\u6001\u826F\u597D\uFF01", params]);
180
171
  else session.quick(["{1} \u6316\u5751\u6210\u529F\uFF01\u611F\u89C9\u826F\u597D\uFF01", params]);
181
172
  if (!cut || cutFailed) {
182
173
  senderRecord.given += 1;
@@ -187,13 +178,11 @@ function main(ctx, config2) {
187
178
  return;
188
179
  }
189
180
  if (targetLength === 0) return session.quick(["{0} \u662F\u5E73\u7684\u554A\uFF01\u4F60\u5E72\u4EC0\u4E48\u4E86\uFF01", params]);
190
- if (targetLength * senderLength < 0)
181
+ if (targetLength < 0 && senderLength < 0)
191
182
  return session.quick(["\u7FA4\u53CB {0} \u548C {1} \u4F60\u90FD\u662F\u53EF\u7231\u7684\u5973\u5B69\u5B50\u5662( \u2022\u0300 \u03C9 \u2022\u0301 )\u2727\uFF0C\u65E0\u6CD5\u8FDB\u884C\u793E\u4FDD\uFF01", params]);
192
- if (targetLength > 0 && senderLength < 0)
193
- return session.quick(["\u4F60\u5728\u60F3\u4EC0\u4E48\uFF1F\uFF1F{1} \u4F60\u662F\u53EF\u7231\u7684\u5973\u5B69\u5B50\u554A( \u2022\u0300 \u03C9 \u2022\u0301 )\u2727", params]);
194
- if (targetLength * senderLength > 0) return session.quick(["\uFF1F\uFF1F\u6960\u6960\uFF1F\uFF1F\u7EDD\u5BF9\u4E0D\u884C\uFF01{1}", params]);
195
- if (targetThickness < senderThickness)
196
- return session.quick(["\u7FA4\u53CB {0} \u7684OO\u592A\u5C0F\u4E86\uFF0C{1} \u4F60\u7684\u793E\u4FDD\u65E0\u6CD5\u8FDB\u5165\uFF01", params]);
183
+ if (targetLength > 0 && senderLength < 0) return session.quick(["\u4F60\u5728\u60F3\u4EC0\u4E48\uFF1F\uFF1F{1} \u4F60\u662F\u53EF\u7231\u7684\u5973\u5B69\u5B50\u554A( \u2022\u0300 \u03C9 \u2022\u0301 )\u2727", params]);
184
+ if (targetLength > 0 && senderLength > 0) return session.quick(["\uFF1F\uFF1F\u6960\u6960\uFF1F\uFF1F\u7EDD\u5BF9\u4E0D\u884C\uFF01{1}", params]);
185
+ if (targetThickness < senderThickness) return session.quick(["\u7FA4\u53CB {0} \u7684OO\u592A\u5C0F\u4E86\uFF0C{1} \u4F60\u7684\u793E\u4FDD\u65E0\u6CD5\u8FDB\u5165\uFF01", params]);
197
186
  const targetRecord = data[targetFullId] || { given: 0, received: 0, lastTime: 0 };
198
187
  if (targetRecord.lastTime < todayStart) {
199
188
  targetRecord.given = 0;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kotori-plugin-penis",
3
- "version": "1.5.1",
3
+ "version": "1.5.2",
4
4
  "description": "查看今日牛牛的长度和排行和寸止",
5
5
  "main": "lib/index.js",
6
6
  "keywords": [