kotori-plugin-penis 1.3.0 → 1.4.0
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.
- package/lib/index.js +43 -25
- package/locales/zh_CN.json +5 -3
- 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.
|
|
3
|
+
* @Version 1.4.0
|
|
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
|
+
* @Date 2026/8/2 15:30:58
|
|
9
9
|
*/
|
|
10
10
|
"use strict";
|
|
11
11
|
var __defProp = Object.defineProperty;
|
|
@@ -39,6 +39,8 @@ const inject = ["file", "server"];
|
|
|
39
39
|
const config = import_kotori_bot.Tsu.Object({
|
|
40
40
|
max: import_kotori_bot.Tsu.Number().default(30).describe("The maximum length of the dick"),
|
|
41
41
|
min: import_kotori_bot.Tsu.Number().default(-30).describe("The minimum length of the dick"),
|
|
42
|
+
maxThickness: import_kotori_bot.Tsu.Number().default(10).describe("The maximum thickness of the dick"),
|
|
43
|
+
minThickness: import_kotori_bot.Tsu.Number().default(0.1).describe("The minimum thickness of the dick"),
|
|
42
44
|
joke: import_kotori_bot.Tsu.Number().default(10).describe("Send a joke when the length is less than value"),
|
|
43
45
|
avgMinNum: import_kotori_bot.Tsu.Number().default(5).describe("The minimum at avg rank"),
|
|
44
46
|
probability: import_kotori_bot.Tsu.Number().default(0.45).describe("\u4E0D\u6000\u5B55\u7684\u6982\u7387 (0-1)"),
|
|
@@ -48,6 +50,7 @@ const config = import_kotori_bot.Tsu.Object({
|
|
|
48
50
|
});
|
|
49
51
|
function main(ctx, config2) {
|
|
50
52
|
const getNewLength = () => config2.min + Math.floor(Math.random() * (config2.max - config2.min + 1));
|
|
53
|
+
const getNewThickness = () => config2.minThickness * 10 + Math.random() * (config2.maxThickness * 10 - config2.minThickness * 10) / 10;
|
|
51
54
|
const getTodayPath = () => `${(/* @__PURE__ */ new Date()).getFullYear()}-${(/* @__PURE__ */ new Date()).getMonth() + 1}-${(/* @__PURE__ */ new Date()).getDay()}.json`;
|
|
52
55
|
const loadTodayData = () => ctx.file.load(getTodayPath(), "json", {});
|
|
53
56
|
const saveTodayData = (data) => ctx.file.save(getTodayPath(), data);
|
|
@@ -60,13 +63,15 @@ function main(ctx, config2) {
|
|
|
60
63
|
ctx.command("dick - \u83B7\u53D6\u4ECA\u65E5\u725B\u725B\u957F\u5EA6").shortcut("\u4ECA\u65E5\u957F\u5EA6").action((_, session) => {
|
|
61
64
|
const id = `${session.api.adapter.identity}${session.userId}`;
|
|
62
65
|
const today = loadTodayData();
|
|
63
|
-
const todayLength =
|
|
64
|
-
const params = [import_kotori_bot.Messages.mention(session.userId), todayLength];
|
|
66
|
+
const [todayLength, todayThickness] = Array.isArray(today[id]) ? today[id] : [getNewLength(), getNewThickness()];
|
|
67
|
+
const params = [import_kotori_bot.Messages.mention(session.userId), todayLength, todayThickness];
|
|
65
68
|
if (todayLength <= 0) session.quick(["newnew.msg.today_length.info.2", params]);
|
|
66
69
|
else if (todayLength > 0 && todayLength <= config2.joke) session.quick(["newnew.msg.today_length.info.1", params]);
|
|
70
|
+
else if (todayThickness > 7) session.quick(["newnew.msg.today_length.info.3", params]);
|
|
71
|
+
else if (todayThickness < 1) session.quick(["newnew.msg.today_length.info.4", params]);
|
|
67
72
|
else session.quick(["newnew.msg.today_length.info.0", params]);
|
|
68
|
-
if (
|
|
69
|
-
today[id] = todayLength;
|
|
73
|
+
if (Array.isArray(today[id])) return;
|
|
74
|
+
today[id] = [todayLength, todayThickness];
|
|
70
75
|
saveTodayData(today);
|
|
71
76
|
const stat = loadStatData();
|
|
72
77
|
const person = stat[id];
|
|
@@ -123,23 +128,18 @@ function main(ctx, config2) {
|
|
|
123
128
|
});
|
|
124
129
|
ctx.command("daydick - \u67E5\u770B\u725B\u725B\u957F\u5EA6\u4ECA\u65E5\u6392\u884C").shortcut("\u4ECA\u65E5\u6392\u884C").action((_, session) => {
|
|
125
130
|
const today = loadTodayData();
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
entries.sort((a, b) => b[1] - a[1]);
|
|
131
|
+
const entries = Object.entries(today).filter((val) => val[0].startsWith(session.api.adapter.identity)).sort((a, b) => b[1][0] - a[1][0]);
|
|
132
|
+
if (entries.length <= 0) return "newnew.msg.today_ranking.fail";
|
|
129
133
|
let list = "";
|
|
130
134
|
let num = 1;
|
|
131
135
|
for (const entry of entries) {
|
|
132
136
|
if (num > 20) continue;
|
|
133
|
-
list += session.format("newnew.msg.today_ranking.list", [
|
|
134
|
-
num,
|
|
135
|
-
entry[0].slice(session.api.adapter.identity.length),
|
|
136
|
-
entry[1]
|
|
137
|
-
]);
|
|
137
|
+
list += session.format("newnew.msg.today_ranking.list", [num, entry[0].slice(session.api.adapter.identity.length), entry[1][0]]);
|
|
138
138
|
num += 1;
|
|
139
139
|
}
|
|
140
140
|
return session.format("newnew.msg.today_ranking", [list]);
|
|
141
141
|
});
|
|
142
|
-
ctx.command("cum [user:string] - \u793E\u4FDD\u4F60\u7684\u7FA4\u53CB").
|
|
142
|
+
ctx.command("cum [user:string] - \u793E\u4FDD\u4F60\u7684\u7FA4\u53CB").shortcut("\u793E\u4FDD").option("C", "cut:boolean \u5BF8\u6B62\u6A21\u5F0F").action(async ({ args, options: { cut } }, session) => {
|
|
143
143
|
const data = loadData();
|
|
144
144
|
const todayStart = getTodayStart();
|
|
145
145
|
const senderId = `${session.api.adapter.identity}${session.userId}`;
|
|
@@ -149,11 +149,26 @@ function main(ctx, config2) {
|
|
|
149
149
|
senderRecord.received = 0;
|
|
150
150
|
senderRecord.lastTime = Date.now();
|
|
151
151
|
}
|
|
152
|
+
const targetId = args[0] ?? session.userId;
|
|
153
|
+
const params = [import_kotori_bot.Messages.mention(targetId), import_kotori_bot.Messages.mention(session.userId)];
|
|
152
154
|
if (senderRecord.given >= config2.maxCount) {
|
|
153
|
-
return session.quick(["\
|
|
155
|
+
return session.quick(["{1} \u4F60\u4ECA\u5929\u5DF2\u7ECF\u793E\u4E86 {0} \u6B21\u4E86\uFF0C\u8EAB\u4F53\u8981\u88AB\u638F\u7A7A\u4E86\u54E6\uFF01\u4F11\u606F\u4E0B\u5427\u3002", [config2.maxCount, params[1]]]);
|
|
154
156
|
}
|
|
155
|
-
const
|
|
157
|
+
const lengthData = loadTodayData();
|
|
156
158
|
const targetFullId = `${session.api.adapter.identity}${targetId}`;
|
|
159
|
+
const [[targetLength, targetThickness], [senderLength, senderThickness]] = [targetFullId, senderId].map(
|
|
160
|
+
(id) => Array.isArray(lengthData[id]) ? lengthData[id] : (() => {
|
|
161
|
+
lengthData[id] = [getNewLength(), getNewThickness()];
|
|
162
|
+
saveTodayData(lengthData);
|
|
163
|
+
return lengthData[id];
|
|
164
|
+
})()
|
|
165
|
+
);
|
|
166
|
+
if (senderLength === 0) return session.quick(["{1} \u4F60\u6CA1\u6709\u6B66\u5668\u554A\uFF01\u60F3\u4EC0\u4E48\u4E86\uFF01", params]);
|
|
167
|
+
if (targetLength === 0) return session.quick(["{0} \u662F\u5E73\u7684\u554A\uFF01\u4F60\u5E72\u4EC0\u4E48\u4E86\uFF01", params]);
|
|
168
|
+
if (targetLength * senderLength < 0) 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]);
|
|
169
|
+
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]);
|
|
170
|
+
if (targetLength * senderLength > 0) return session.quick(["\uFF1F\uFF1F\u6960\u6960\uFF1F\uFF1F\u7EDD\u5BF9\u4E0D\u884C\uFF01{1}", params]);
|
|
171
|
+
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]);
|
|
157
172
|
const targetRecord = data[targetFullId] || { given: 0, received: 0, lastTime: 0 };
|
|
158
173
|
if (targetRecord.lastTime < todayStart) {
|
|
159
174
|
targetRecord.given = 0;
|
|
@@ -161,7 +176,7 @@ function main(ctx, config2) {
|
|
|
161
176
|
targetRecord.lastTime = Date.now();
|
|
162
177
|
}
|
|
163
178
|
if (targetRecord.received >= config2.maxCount2) {
|
|
164
|
-
return session.quick(["\u7FA4\u53CB {0} \u7684\u5C0F\u809A\u809A\u5DF2\u7ECF\u88C5\u4E0D\u4E0B\u4E86\uFF0C\u8BF7\u4E0D\u8981\u518D\u793E\u4E86\uFF01",
|
|
179
|
+
return session.quick(["\u7FA4\u53CB {0} \u7684\u5C0F\u809A\u809A\u5DF2\u7ECF\u88C5\u4E0D\u4E0B\u4E86\uFF0C{1} \u8BF7\u4E0D\u8981\u518D\u793E\u4E86\uFF01", params]);
|
|
165
180
|
}
|
|
166
181
|
const cutFailed = Math.random() < config2.cutProbability;
|
|
167
182
|
const noPregnancy = Math.random() < config2.probability;
|
|
@@ -173,7 +188,10 @@ function main(ctx, config2) {
|
|
|
173
188
|
"\u4E09\u80DE\u80CE\uFF01",
|
|
174
189
|
"\u4E00\u4E2A\u5927\u80D6\u5C0F\u5B50",
|
|
175
190
|
"\u4E00\u5BF9\u9F99\u51E4\u53CC\u80DE\u80CE",
|
|
176
|
-
"\u4E00\u53EA\u5C0F\u5DE7\u5C0F\u5973\u513F"
|
|
191
|
+
"\u4E00\u53EA\u5C0F\u5DE7\u5C0F\u5973\u513F",
|
|
192
|
+
"\u4E00\u53EA\u5F02\u5F62\uFF01",
|
|
193
|
+
"\u4E00\u5BF9\u5F02\u5F62\uFF01",
|
|
194
|
+
"\u4E00\u7FA4\u5F02\u5F62\uFF01"
|
|
177
195
|
];
|
|
178
196
|
const pickBaby = () => babyTypes[Math.floor(Math.random() * babyTypes.length)];
|
|
179
197
|
if (cut) {
|
|
@@ -181,17 +199,17 @@ function main(ctx, config2) {
|
|
|
181
199
|
senderRecord.given++;
|
|
182
200
|
targetRecord.received++;
|
|
183
201
|
const babyStr = noPregnancy ? "\u5E86\u5E78\u7684\u662F\u6CA1\u6709\u6000\u5B55" : `\u7FA4\u53CB\u8BDE\u4E0B\u4E86 ${pickBaby()}`;
|
|
184
|
-
session.quick([
|
|
202
|
+
session.quick([`{1} \u4F60\u5728 cum \u7FA4\u53CB {0} \u7684\u8FC7\u7A0B\u4E2D\u4F7F\u7528\u4E86\u5BF8\u6B62\uFF0C\u4F46\u4F60\u6CA1\u5FCD\u4F4F\uFF01${babyStr}`, params]);
|
|
185
203
|
} else {
|
|
186
|
-
session.quick(["\u4F60\u5728 cum \u7FA4\u53CB {0} \u7684\u8FC7\u7A0B\u4E2D\u6210\u529F\u5BF8\u6B62\uFF01(\u597D\u8170\u529B\uFF01)",
|
|
204
|
+
session.quick(["{1} \u4F60\u5728 cum \u7FA4\u53CB {0} \u7684\u8FC7\u7A0B\u4E2D\u6210\u529F\u5BF8\u6B62\uFF01(\u597D\u8170\u529B\uFF01)", params]);
|
|
187
205
|
}
|
|
188
206
|
} else {
|
|
189
207
|
senderRecord.given++;
|
|
190
208
|
targetRecord.received++;
|
|
191
209
|
if (noPregnancy) {
|
|
192
|
-
session.quick(["\u4F60\u793E\u4FDD\u4E86\u7FA4\u53CB {0}\uFF0C\u4F46\u5979\u5E76\u6CA1\u6709\u6000\u5B55\u2026\u2026",
|
|
210
|
+
session.quick(["{1} \u4F60\u793E\u4FDD\u4E86\u7FA4\u53CB {0}\uFF0C\u4F46\u5979\u5E76\u6CA1\u6709\u6000\u5B55\u2026\u2026", params]);
|
|
193
211
|
} else {
|
|
194
|
-
session.quick([
|
|
212
|
+
session.quick([`{1} \u4F60\u793E\u4FDD\u4E86\u7FA4\u53CB {0} \u5E76\u8BDE\u4E0B\u4E86 ${pickBaby()}`, params]);
|
|
195
213
|
}
|
|
196
214
|
}
|
|
197
215
|
const now = Date.now();
|
|
@@ -201,7 +219,7 @@ function main(ctx, config2) {
|
|
|
201
219
|
data[targetFullId] = targetRecord;
|
|
202
220
|
saveData(data);
|
|
203
221
|
});
|
|
204
|
-
ctx.command("cum-check [user:string] - \u67E5\u770B\u793E\u4FDD\u7EDF\u8BA1").
|
|
222
|
+
ctx.command("cum-check [user:string] - \u67E5\u770B\u793E\u4FDD\u7EDF\u8BA1").shortcut("\u793E\u4FDD\u67E5\u8BE2").action(({ args }, session) => {
|
|
205
223
|
const data = loadData();
|
|
206
224
|
const targetId = args[0] ?? session.userId;
|
|
207
225
|
const fullId = `${session.api.adapter.identity}${targetId}`;
|
|
@@ -220,7 +238,7 @@ function main(ctx, config2) {
|
|
|
220
238
|
[import_kotori_bot.Messages.mention(targetId)]
|
|
221
239
|
);
|
|
222
240
|
});
|
|
223
|
-
ctx.command("cum-reset [user:string] - \u91CD\u7F6E\u6B21\u6570").
|
|
241
|
+
ctx.command("cum-reset [user:string] - \u91CD\u7F6E\u6B21\u6570").shortcut("\u793E\u4FDD\u91CD\u7F6E").access(import_kotori_bot.UserAccess.MANGER).action(({ args }, session) => {
|
|
224
242
|
const data = loadData();
|
|
225
243
|
const targetId = args[0] ?? session.userId;
|
|
226
244
|
const fullId = `${session.api.adapter.identity}${targetId}`;
|
package/locales/zh_CN.json
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"newnew.descr.today_length": "获取今日的牛~牛长度",
|
|
3
|
-
"newnew.msg.today_length.info.0": "{0}今日的牛~牛长度是{1} cm
|
|
4
|
-
"newnew.msg.today_length.info.1": "{0}今日的牛~牛长度是{1} cm",
|
|
5
|
-
"newnew.msg.today_length.info.2": "{0}今日的牛~牛长度是...今天是可爱的女孩子噢( •̀ ω •́ )✧({1}cm)",
|
|
3
|
+
"newnew.msg.today_length.info.0": "{0}今日的牛~牛长度是{1} cm,粗度是{2} cm,...真的有那么长吗(#°Д°)",
|
|
4
|
+
"newnew.msg.today_length.info.1": "{0}今日的牛~牛长度是{1} cm,粗度是{2} cm",
|
|
5
|
+
"newnew.msg.today_length.info.2": "{0}今日的牛~牛长度是...今天是可爱的女孩子噢( •̀ ω •́ )✧({1}cm),粗度是{2} cm",
|
|
6
|
+
"newnew.msg.today_length.info.3": "{0}今日的牛~牛长度是{1} cm,粗度是{2} cm,...真的有那么粗吗(#°Д°)",
|
|
7
|
+
"newnew.msg.today_length.info.4": "{0}今日的牛~牛长度是{1} cm,粗度是{2} cm,...真的有那么细吗(#°Д°)",
|
|
6
8
|
"newnew.descr.my_length": "获取自己的牛牛信息",
|
|
7
9
|
"newnew.msg.my_length": "{0}\n最大长度:{1} cm 最深长度:{2} cm\n使用次数:{3} 次 累计长度:{4} cm\n平均长度:{5} cm",
|
|
8
10
|
"newnew.msg.my_length.fail": "{0}你的牛牛丢了...找不到你的牛牛数据呢/(ㄒoㄒ)/~~对不起",
|