koishi-plugin-cocoyyy-console 1.0.16-beta.5 → 1.0.16-beta.6
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 +19 -3
- package/package.json +1 -1
package/lib/index.js
CHANGED
|
@@ -1521,6 +1521,17 @@ __name(checkShitOrNot, "checkShitOrNot");
|
|
|
1521
1521
|
|
|
1522
1522
|
// src/services/son_func/shit_or_not_command.ts
|
|
1523
1523
|
var local_config = null;
|
|
1524
|
+
var mode_intro = {
|
|
1525
|
+
"esu": "【图文】ohno妈咪饿素啊😨,恶俗慎用!🈲",
|
|
1526
|
+
"nov": "【图文】来段微小说📕",
|
|
1527
|
+
"lit": "【图文】文楠魅力时刻📕👨",
|
|
1528
|
+
"zhi": "【图文】分享你刚编的故事🤓",
|
|
1529
|
+
"boa": "【图文】《答案之书》🔮",
|
|
1530
|
+
"scp": "【图文】控制-收容-保护,献上你的异常👽",
|
|
1531
|
+
"phi": "【图文】我思,故我在🧠",
|
|
1532
|
+
"see": "【图像】让我康康怎么个事👀",
|
|
1533
|
+
"ccb": "【图像】压抑笑传之踩踩背🐘"
|
|
1534
|
+
};
|
|
1524
1535
|
function loadYamlConfig(configPath) {
|
|
1525
1536
|
if (!configPath) {
|
|
1526
1537
|
logger.error("[loadYamlConfig Error]: SON 配置文件路径未配置");
|
|
@@ -1553,14 +1564,19 @@ function registerShitOrNotCommands(ctx, config) {
|
|
|
1553
1564
|
} else {
|
|
1554
1565
|
logger.error("[loadYamlConfig Error]: 未配置 SON 配置文件路径");
|
|
1555
1566
|
}
|
|
1567
|
+
ctx.command("sonlist <参数>", "查看son判断模式列表").action(() => {
|
|
1568
|
+
return `[所有命令都需要@bot]
|
|
1569
|
+
son判断模式列表:
|
|
1570
|
+
${Object.keys(mode_intro).map((item) => item + ": " + mode_intro[item]).join("\n ")}`;
|
|
1571
|
+
});
|
|
1556
1572
|
ctx.command("son <参数>", "判定是否为史").action(async ({ session }, ...args) => {
|
|
1557
1573
|
if (!dev_mode) {
|
|
1558
|
-
if (!is_at_bot_quote(session)) return "请提供正确格式,如:[引用消息] @bot son [判断模式]";
|
|
1574
|
+
if (!is_at_bot_quote(session)) return "请提供正确格式,如:1 [引用消息] @bot son [判断模式]";
|
|
1559
1575
|
} else {
|
|
1560
|
-
if (!session.quote) return "请提供正确格式,如:[引用消息] @bot son [判断模式]";
|
|
1576
|
+
if (!session.quote) return "请提供正确格式,如:2 [引用消息] @bot son [判断模式]";
|
|
1561
1577
|
}
|
|
1562
1578
|
const parttern = args?.[0];
|
|
1563
|
-
if (!parttern) return "请提供正确格式,如:[引用消息] @bot son [判断模式]";
|
|
1579
|
+
if (!parttern) return "请提供正确格式,如:3 [引用消息] @bot son [判断模式]";
|
|
1564
1580
|
if (!local_config) return "未加载配置文件,请查看日志";
|
|
1565
1581
|
const parttern_msg = local_config.shit_or_not?.prompts[parttern];
|
|
1566
1582
|
if (!parttern_msg) return "未找到判断模式,请查看日志";
|