koishi-plugin-game-mini 0.1.3 → 0.1.5
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 +4 -4
- package/lib/locales/locales/zh-CN.yml +2 -1
- package/package.json +1 -1
package/lib/index.js
CHANGED
|
@@ -39,10 +39,10 @@ function apply(ctx, config) {
|
|
|
39
39
|
tooSmall: '猜小啦!当前范围更新为 [{0}-{1}]',
|
|
40
40
|
tooBig: '猜大啦!当前范围更新为 [{0}-{1}]',
|
|
41
41
|
correct: '恭喜你猜中了!正确数字就是 {0} 🎉',
|
|
42
|
-
botFirstGuess: '我先来猜一个:{0},该你啦~',
|
|
43
42
|
botWin: '哈哈我猜中了!我猜的是 {0},正确数字就是 {0},我赢啦 🎉',
|
|
44
43
|
botGuessTooSmall: '我猜 {0},猜小啦!当前范围 [{1}-{2}]',
|
|
45
|
-
botGuessTooBig: '我猜 {0},猜大啦!当前范围 [{1}-{2}]'
|
|
44
|
+
botGuessTooBig: '我猜 {0},猜大啦!当前范围 [{1}-{2}]',
|
|
45
|
+
commandDesc: '猜数字小游戏指令'
|
|
46
46
|
}
|
|
47
47
|
};
|
|
48
48
|
try {
|
|
@@ -119,7 +119,8 @@ function apply(ctx, config) {
|
|
|
119
119
|
}
|
|
120
120
|
await session.send(reply);
|
|
121
121
|
});
|
|
122
|
-
ctx.command('guess <action:string>'
|
|
122
|
+
ctx.command('guess <action:string>', '猜数字小游戏指令')
|
|
123
|
+
.action(async ({ session }, action) => {
|
|
123
124
|
if (!session)
|
|
124
125
|
return '';
|
|
125
126
|
const key = getSessionKey(session);
|
|
@@ -141,7 +142,6 @@ function apply(ctx, config) {
|
|
|
141
142
|
state.started = true;
|
|
142
143
|
state.botGuess = [];
|
|
143
144
|
guessNumberStates.set(key, state);
|
|
144
|
-
// 移除启动时Bot先猜数的逻辑,仅提示游戏开始
|
|
145
145
|
const msg = session.text('guessNumber.start', [config.guessNumber.min, config.guessNumber.max]);
|
|
146
146
|
await session.send(msg);
|
|
147
147
|
return '';
|