@azimiao/koishi-plugin-cafe-bot-exp 0.0.47 → 0.0.51
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 +9 -8
- package/package.json +1 -1
package/lib/index.js
CHANGED
|
@@ -40,7 +40,7 @@ module.exports = __toCommonJS(src_exports);
|
|
|
40
40
|
var import_url = require("url");
|
|
41
41
|
|
|
42
42
|
// package.json
|
|
43
|
-
var version = "0.0.
|
|
43
|
+
var version = "0.0.51";
|
|
44
44
|
|
|
45
45
|
// src/index.ts
|
|
46
46
|
var import_censor = require("@koishijs/censor");
|
|
@@ -531,7 +531,8 @@ var CafeBotQuizConfig = import_koishi3.Schema.object({
|
|
|
531
531
|
disableDirectMDReply: import_koishi3.Schema.string().default("暂不支持私聊回复哦,请从群聊@我吧"),
|
|
532
532
|
disableMDAt: import_koishi3.Schema.boolean().description("在md回复中禁用@").default(false),
|
|
533
533
|
useReDefine: import_koishi3.Schema.boolean().description("test").default(false),
|
|
534
|
-
insertBeforeAt: import_koishi3.Schema.string().description("在@前插入的字符串").default("用户")
|
|
534
|
+
insertBeforeAt: import_koishi3.Schema.string().description("在@前插入的字符串").default("用户"),
|
|
535
|
+
MDPicAppendPX: import_koishi3.Schema.boolean().description("是否在图片尺寸后追加px").default(true)
|
|
535
536
|
}).description("答题配置");
|
|
536
537
|
|
|
537
538
|
// src/common/CafeTimeTools.ts
|
|
@@ -657,7 +658,7 @@ async function apply2(ctx, config) {
|
|
|
657
658
|
}, { primary: "id", autoInc: true });
|
|
658
659
|
await downloadQuitDataIfNotExist(ctx, config, config.forceUpdateWhenLoad);
|
|
659
660
|
ctx.command("轨迹问答", "证明自己是合格的桂皮吧~");
|
|
660
|
-
ctx.command("
|
|
661
|
+
ctx.command("轨迹问答/出题", "抽取一道题目", { hidden: false }).action(async (argv, _) => {
|
|
661
662
|
await downloadQuitDataIfNotExist(ctx, config, false);
|
|
662
663
|
var lastQuestion = await ctx.cache.get("question", argv.session.userId);
|
|
663
664
|
if (lastQuestion) {
|
|
@@ -742,11 +743,11 @@ async function apply2(ctx, config) {
|
|
|
742
743
|
});
|
|
743
744
|
msgQQ.markdown.params.push({
|
|
744
745
|
key: "img_width",
|
|
745
|
-
values: [config.imgWidth]
|
|
746
|
+
values: [`${config.imgWidth}${config.MDPicAppendPX ? "px" : ""}`]
|
|
746
747
|
});
|
|
747
748
|
msgQQ.markdown.params.push({
|
|
748
749
|
key: "img_height",
|
|
749
|
-
values: [config.imgHeight]
|
|
750
|
+
values: [`${config.imgHeight}${config.MDPicAppendPX ? "px" : ""}`]
|
|
750
751
|
});
|
|
751
752
|
}
|
|
752
753
|
if (config.appendMDBtn) {
|
|
@@ -903,11 +904,11 @@ async function apply2(ctx, config) {
|
|
|
903
904
|
});
|
|
904
905
|
msgQQ.markdown.params.push({
|
|
905
906
|
key: "img_width",
|
|
906
|
-
values: [config.imgWidth]
|
|
907
|
+
values: [`${config.imgWidth}${config.MDPicAppendPX ? "px" : ""}`]
|
|
907
908
|
});
|
|
908
909
|
msgQQ.markdown.params.push({
|
|
909
910
|
key: "img_height",
|
|
910
|
-
values: [config.imgHeight]
|
|
911
|
+
values: [`${config.imgHeight}${config.MDPicAppendPX ? "px" : ""}`]
|
|
911
912
|
});
|
|
912
913
|
if (config.appendMDBtn) {
|
|
913
914
|
msgQQ.keyboard = {
|
|
@@ -937,7 +938,7 @@ async function apply2(ctx, config) {
|
|
|
937
938
|
}
|
|
938
939
|
return;
|
|
939
940
|
});
|
|
940
|
-
ctx.command("
|
|
941
|
+
ctx.command("轨迹问答/旧出题", "随机抽一道题目(旧版)", { hidden: true }).action(async (argv, _) => {
|
|
941
942
|
await downloadQuitDataIfNotExist(ctx, config, false);
|
|
942
943
|
var lastQuestion = await ctx.cache.get("question", argv.session.userId);
|
|
943
944
|
if (lastQuestion) {
|