@azimiao/koishi-plugin-cafe-bot-exp 0.0.41 → 0.0.43
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 +7 -3
- package/lib/quiz/config.d.ts +24 -0
- 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.43";
|
|
44
44
|
|
|
45
45
|
// src/index.ts
|
|
46
46
|
var import_censor = require("@koishijs/censor");
|
|
@@ -529,7 +529,9 @@ var CafeBotQuizConfig = import_koishi3.Schema.object({
|
|
|
529
529
|
imgHeight: import_koishi3.Schema.number().description("QQ图像高度").default(0),
|
|
530
530
|
disableDriectMD: import_koishi3.Schema.boolean().description("j禁用私聊 MD 回复").default(true),
|
|
531
531
|
disableDirectMDReply: import_koishi3.Schema.string().default("暂不支持私聊回复哦,请从群聊@我吧"),
|
|
532
|
-
disableMDAt: import_koishi3.Schema.boolean().description("在md回复中禁用@").default(false)
|
|
532
|
+
disableMDAt: import_koishi3.Schema.boolean().description("在md回复中禁用@").default(false),
|
|
533
|
+
useReDefine: import_koishi3.Schema.boolean().description("test").default(false),
|
|
534
|
+
insertBeforeAt: import_koishi3.Schema.string().description("在@前插入的字符串").default("用户")
|
|
533
535
|
}).description("答题配置");
|
|
534
536
|
|
|
535
537
|
// src/common/CafeTimeTools.ts
|
|
@@ -701,7 +703,9 @@ async function apply2(ctx, config) {
|
|
|
701
703
|
params: [
|
|
702
704
|
{
|
|
703
705
|
key: "user",
|
|
704
|
-
values: [
|
|
706
|
+
values: [
|
|
707
|
+
config.disableMDAt || argv.session.isDirect ? "你" : config.useReDefine ? `${config.insertBeforeAt}<qqbot-at-user id="${argv.session.userId}" />` : `${config.insertBeforeAt}<qqbot-at-user id="${argv.session.userId}" />`
|
|
708
|
+
]
|
|
705
709
|
// 群聊@,私聊不@
|
|
706
710
|
},
|
|
707
711
|
{
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 轨迹答题配置
|
|
3
|
+
*/
|
|
4
|
+
import { Schema } from "koishi";
|
|
5
|
+
export interface CafeBotQuizConfig {
|
|
6
|
+
baseQuizUrl: string;
|
|
7
|
+
forceUpdateWhenLoad: boolean;
|
|
8
|
+
answerTimeout: number;
|
|
9
|
+
maxQuizPerDay: number;
|
|
10
|
+
redisServer: string;
|
|
11
|
+
redisAuth: string;
|
|
12
|
+
qqQuizMDTextID: string;
|
|
13
|
+
qqQuizMDImgID: string;
|
|
14
|
+
qqQuizButtonID: string;
|
|
15
|
+
appendMDBtn: boolean;
|
|
16
|
+
imgWidth: number;
|
|
17
|
+
imgHeight: number;
|
|
18
|
+
disableDriectMD: boolean;
|
|
19
|
+
disableDirectMDReply: string;
|
|
20
|
+
disableMDAt: boolean;
|
|
21
|
+
useReDefine: boolean;
|
|
22
|
+
insertBeforeAt: string;
|
|
23
|
+
}
|
|
24
|
+
export declare const CafeBotQuizConfig: Schema<CafeBotQuizConfig>;
|