@azimiao/koishi-plugin-cafe-bot-exp 0.0.28 → 0.0.30
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 +3 -1
- package/package.json +1 -1
- package/lib/cat/config.d.ts +0 -9
- package/lib/cat/index.d.ts +0 -15
- package/lib/common/CafeTimeTools.d.ts +0 -4
- package/lib/common/DailySeededName.d.ts +0 -1
- package/lib/common/PseudoRandom.d.ts +0 -11
- package/lib/common/at.d.ts +0 -1
- package/lib/common/downloadTool.d.ts +0 -3
- package/lib/config.d.ts +0 -11
- package/lib/draw/config.d.ts +0 -24
- package/lib/draw/index.d.ts +0 -15
- package/lib/draw/templete/html.d.ts +0 -2
- package/lib/index.d.ts +0 -17
- package/lib/quiz/config.d.ts +0 -17
- package/lib/quiz/index.d.ts +0 -37
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.30";
|
|
44
44
|
|
|
45
45
|
// src/index.ts
|
|
46
46
|
var import_censor = require("@koishijs/censor");
|
|
@@ -688,8 +688,10 @@ async function apply2(ctx, config) {
|
|
|
688
688
|
}
|
|
689
689
|
await ctx.cache.set("question", argv.session.userId, { question: randomId, answer: answerIndex }, config.answerTimeout * 1e3);
|
|
690
690
|
var msgQQ = {
|
|
691
|
+
content: "111",
|
|
691
692
|
msg_type: 2,
|
|
692
693
|
msg_id: argv.session.messageId,
|
|
694
|
+
timestamp: argv.session.timestamp,
|
|
693
695
|
markdown: {
|
|
694
696
|
custom_template_id: `${qItem.question.img.length > 0 ? config.qqQuizMDImgID : config.qqQuizMDTextID}`,
|
|
695
697
|
params: [
|
package/package.json
CHANGED
package/lib/cat/config.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { Schema } from "koishi";
|
|
2
|
-
export interface CafeBotCatConfig {
|
|
3
|
-
catName: string;
|
|
4
|
-
}
|
|
5
|
-
export declare const CafeBotCatConfig: Schema<Schemastery.ObjectS<{
|
|
6
|
-
catName: Schema<string, string>;
|
|
7
|
-
}>, Schemastery.ObjectT<{
|
|
8
|
-
catName: Schema<string, string>;
|
|
9
|
-
}>>;
|
package/lib/cat/index.d.ts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 黑猫柯贝
|
|
3
|
-
*/
|
|
4
|
-
import { Context, Schema } from 'koishi';
|
|
5
|
-
import { CafeBotCatConfig } from './config';
|
|
6
|
-
export declare const name = "cafe-bot-exp.cat";
|
|
7
|
-
export interface Config extends CafeBotCatConfig {
|
|
8
|
-
}
|
|
9
|
-
export declare const Config: Schema<Config>;
|
|
10
|
-
export declare const injectDepend: {
|
|
11
|
-
required: any[];
|
|
12
|
-
optional: string[];
|
|
13
|
-
};
|
|
14
|
-
export declare const inject: any[];
|
|
15
|
-
export declare function apply(ctx: Context): Promise<void>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function DailySeededName(uid: any): string;
|
package/lib/common/at.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function At(argv: any, newLine?: boolean): string;
|
package/lib/config.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { Schema } from "koishi";
|
|
2
|
-
import { CafeBotDrawConfig } from "./draw/config";
|
|
3
|
-
import { CafeBotQuizConfig } from "./quiz/config";
|
|
4
|
-
import { CafeBotCatConfig } from "./cat/config";
|
|
5
|
-
export interface CafeBotConfig {
|
|
6
|
-
logoUrl: string;
|
|
7
|
-
refreshLogoWhenLoad: boolean;
|
|
8
|
-
useLocalLogoFile: boolean;
|
|
9
|
-
}
|
|
10
|
-
export type Config = CafeBotConfig & CafeBotDrawConfig & CafeBotQuizConfig & CafeBotCatConfig;
|
|
11
|
-
export declare const Config: Schema<Config>;
|
package/lib/draw/config.d.ts
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 轨迹抽卡配置
|
|
3
|
-
*/
|
|
4
|
-
import { Schema } from "koishi";
|
|
5
|
-
export interface CafeBotDrawConfig {
|
|
6
|
-
baseDataUrl: string;
|
|
7
|
-
forceUpdateDataWhenLoad: boolean;
|
|
8
|
-
ImageServer: string;
|
|
9
|
-
ImageServerAuth: string;
|
|
10
|
-
ImageNoCache: boolean;
|
|
11
|
-
MinCount: number;
|
|
12
|
-
MaxCount: number;
|
|
13
|
-
Star1Name: string;
|
|
14
|
-
Star1Chance: number;
|
|
15
|
-
Star2Name: string;
|
|
16
|
-
Star2Chance: number;
|
|
17
|
-
Star3Name: string;
|
|
18
|
-
Star3Chance: number;
|
|
19
|
-
Star4Name: string;
|
|
20
|
-
Star4Chance: number;
|
|
21
|
-
Star5Name: string;
|
|
22
|
-
Star5Chance: number;
|
|
23
|
-
}
|
|
24
|
-
export declare const CafeBotDrawConfig: Schema<CafeBotDrawConfig>;
|
package/lib/draw/index.d.ts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 轨迹抽卡
|
|
3
|
-
*/
|
|
4
|
-
import { Context, Schema } from 'koishi';
|
|
5
|
-
import { CafeBotDrawConfig } from './config';
|
|
6
|
-
export declare const name = "cafe-bot-exp.draw";
|
|
7
|
-
export declare const injectDepend: {
|
|
8
|
-
required: string[];
|
|
9
|
-
optional: string[];
|
|
10
|
-
};
|
|
11
|
-
export declare const inject: string[];
|
|
12
|
-
export interface Config extends CafeBotDrawConfig {
|
|
13
|
-
}
|
|
14
|
-
export declare const Config: Schema<Config>;
|
|
15
|
-
export declare function apply(ctx: Context, config: Config): Promise<void>;
|
package/lib/index.d.ts
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 主入口文件
|
|
3
|
-
*/
|
|
4
|
-
import { Context } from 'koishi';
|
|
5
|
-
import { Config } from './config';
|
|
6
|
-
import '@koishijs/censor';
|
|
7
|
-
import * as draw from "./draw/index";
|
|
8
|
-
import * as quiz from "./quiz/index";
|
|
9
|
-
import * as cat from "./cat/index";
|
|
10
|
-
export declare const name = "cafe-bot-exp";
|
|
11
|
-
export * from "./config";
|
|
12
|
-
export declare const plugins: (typeof draw | typeof quiz | typeof cat)[];
|
|
13
|
-
export declare const inject: {
|
|
14
|
-
required: any[];
|
|
15
|
-
optional: string[];
|
|
16
|
-
};
|
|
17
|
-
export declare function apply(ctx: Context, config: Config): Promise<void>;
|
package/lib/quiz/config.d.ts
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
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
|
-
}
|
|
17
|
-
export declare const CafeBotQuizConfig: Schema<CafeBotQuizConfig>;
|
package/lib/quiz/index.d.ts
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 轨迹问答
|
|
3
|
-
*/
|
|
4
|
-
import { Context, Schema } from 'koishi';
|
|
5
|
-
import { CafeBotQuizConfig } from './config';
|
|
6
|
-
export declare const name = "cafe-bot-exp.quiz";
|
|
7
|
-
export declare const injectDepend: {
|
|
8
|
-
required: string[];
|
|
9
|
-
optional: string[];
|
|
10
|
-
};
|
|
11
|
-
export declare const inject: string[];
|
|
12
|
-
export interface Config extends CafeBotQuizConfig {
|
|
13
|
-
}
|
|
14
|
-
export declare const Config: Schema<Config>;
|
|
15
|
-
interface QuestionCache {
|
|
16
|
-
question: number;
|
|
17
|
-
answer: number;
|
|
18
|
-
}
|
|
19
|
-
declare module '@koishijs/cache' {
|
|
20
|
-
interface Tables {
|
|
21
|
-
question: QuestionCache;
|
|
22
|
-
todayCache: number;
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
declare module 'koishi' {
|
|
26
|
-
interface Tables {
|
|
27
|
-
'cafeQuiz': CafeQuiz;
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
export interface CafeQuiz {
|
|
31
|
-
id: number;
|
|
32
|
-
userId: string;
|
|
33
|
-
right: number;
|
|
34
|
-
wrong: number;
|
|
35
|
-
}
|
|
36
|
-
export declare function apply(ctx: Context, config: Config): Promise<void>;
|
|
37
|
-
export {};
|