koishi-plugin-game-mini 0.2.6 → 0.2.7
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.d.ts +49 -6
- package/lib/index.js +641 -383
- package/package.json +1 -1
- package/readme.md +112 -79
package/lib/index.d.ts
CHANGED
|
@@ -1,14 +1,50 @@
|
|
|
1
1
|
import { Context, Schema } from 'koishi';
|
|
2
2
|
export declare const name = "game-mini";
|
|
3
|
-
export declare const using: readonly ["i18n"];
|
|
3
|
+
export declare const using: readonly ["i18n", "database"];
|
|
4
4
|
export declare const inject: readonly ["console"];
|
|
5
|
+
declare module 'koishi' {
|
|
6
|
+
interface Tables {
|
|
7
|
+
game_mini_player: GamePlayerData;
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
interface GamePlayerData {
|
|
11
|
+
id: number;
|
|
12
|
+
guildId: string;
|
|
13
|
+
platform: string;
|
|
14
|
+
userId: string;
|
|
15
|
+
name: string;
|
|
16
|
+
score: number;
|
|
17
|
+
correctCount: number;
|
|
18
|
+
playCount: number;
|
|
19
|
+
lastGameTime: number;
|
|
20
|
+
}
|
|
5
21
|
export interface Config {
|
|
6
22
|
enableNumberGuess: boolean;
|
|
7
23
|
enableWzHero: boolean;
|
|
8
24
|
enableChengyuImage: boolean;
|
|
9
25
|
enableChengyuJielong: boolean;
|
|
10
26
|
enableCalc24: boolean;
|
|
11
|
-
|
|
27
|
+
privateGame: {
|
|
28
|
+
enableNumberGuess: boolean;
|
|
29
|
+
enableWzHero: boolean;
|
|
30
|
+
enableChengyuImage: boolean;
|
|
31
|
+
enableChengyuJielong: boolean;
|
|
32
|
+
enableCalc24: boolean;
|
|
33
|
+
};
|
|
34
|
+
rank: {
|
|
35
|
+
enableCommand: boolean;
|
|
36
|
+
maxDisplay: number;
|
|
37
|
+
clearDataPermission: number;
|
|
38
|
+
messages: {
|
|
39
|
+
title: string;
|
|
40
|
+
empty: string;
|
|
41
|
+
playerInfo: string;
|
|
42
|
+
totalStats: string;
|
|
43
|
+
noPermission: string;
|
|
44
|
+
clearSuccess: string;
|
|
45
|
+
showTotalStats: boolean;
|
|
46
|
+
};
|
|
47
|
+
};
|
|
12
48
|
guessNumber: {
|
|
13
49
|
min: number;
|
|
14
50
|
max: number;
|
|
@@ -18,6 +54,9 @@ export interface Config {
|
|
|
18
54
|
autoPlayDelay: number;
|
|
19
55
|
autoPlayMaxCount: number;
|
|
20
56
|
autoStopInactiveTime: number;
|
|
57
|
+
enablePenalty: boolean;
|
|
58
|
+
rewardScore: number;
|
|
59
|
+
penaltyScore: number;
|
|
21
60
|
messages: {
|
|
22
61
|
usage: string;
|
|
23
62
|
start: string;
|
|
@@ -39,6 +78,7 @@ export interface Config {
|
|
|
39
78
|
showRank: boolean;
|
|
40
79
|
defaultDifficulty: '简单' | '中等' | '困难';
|
|
41
80
|
autoStopInactiveTime: number;
|
|
81
|
+
rewardScore: number;
|
|
42
82
|
messages: {
|
|
43
83
|
start: string;
|
|
44
84
|
startUsage: string;
|
|
@@ -61,6 +101,7 @@ export interface Config {
|
|
|
61
101
|
showRank: boolean;
|
|
62
102
|
defaultHintLevel: 1 | 2 | 3 | 4 | 5;
|
|
63
103
|
autoStopInactiveTime: number;
|
|
104
|
+
rewardScore: number;
|
|
64
105
|
messages: {
|
|
65
106
|
start: string;
|
|
66
107
|
stop: string;
|
|
@@ -81,12 +122,14 @@ export interface Config {
|
|
|
81
122
|
};
|
|
82
123
|
};
|
|
83
124
|
chengyuJielong: {
|
|
84
|
-
botParticipateInGroup: boolean;
|
|
85
125
|
totalRounds: number;
|
|
86
126
|
showRank: boolean;
|
|
87
127
|
autoPlayDelay: number;
|
|
88
128
|
autoPlayMaxCount: number;
|
|
89
129
|
autoStopInactiveTime: number;
|
|
130
|
+
maxRounds: number;
|
|
131
|
+
botParticipate: boolean;
|
|
132
|
+
rewardScore: number;
|
|
90
133
|
messages: {
|
|
91
134
|
start: string;
|
|
92
135
|
stop: string;
|
|
@@ -96,7 +139,6 @@ export interface Config {
|
|
|
96
139
|
botTurn: string;
|
|
97
140
|
botWin: string;
|
|
98
141
|
autoPlayTooMany: string;
|
|
99
|
-
gameInactiveStop: string;
|
|
100
142
|
notIdiom: string;
|
|
101
143
|
correct: string;
|
|
102
144
|
wrong: string;
|
|
@@ -127,6 +169,7 @@ export interface Config {
|
|
|
127
169
|
};
|
|
128
170
|
};
|
|
129
171
|
autoStopInactiveTime: number;
|
|
172
|
+
rewardScore: number;
|
|
130
173
|
messages: {
|
|
131
174
|
start: string;
|
|
132
175
|
stop: string;
|
|
@@ -134,7 +177,6 @@ export interface Config {
|
|
|
134
177
|
generate: string;
|
|
135
178
|
correct: string;
|
|
136
179
|
wrong: string;
|
|
137
|
-
impossible: string;
|
|
138
180
|
solved: string;
|
|
139
181
|
roundEnd: string;
|
|
140
182
|
gameEnd: string;
|
|
@@ -154,4 +196,5 @@ export interface Config {
|
|
|
154
196
|
};
|
|
155
197
|
}
|
|
156
198
|
export declare const Config: Schema<Config>;
|
|
157
|
-
export declare function apply(ctx: Context, cfg: Config): void
|
|
199
|
+
export declare function apply(ctx: Context, cfg: Config): Promise<void>;
|
|
200
|
+
export {};
|