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 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>').action(async ({ session }, action) => {
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 '';
@@ -8,4 +8,5 @@ guessNumber:
8
8
  correct: 恭喜你猜中了!正确数字就是 {0} 🎉
9
9
  botWin: 哈哈我猜中了!我猜的是 {0},正确数字就是 {0},我赢啦 🎉
10
10
  botGuessTooSmall: 我猜 {0},猜小啦!当前范围 [{1}-{2}]
11
- botGuessTooBig: 我猜 {0},猜大啦!当前范围 [{1}-{2}]
11
+ botGuessTooBig: 我猜 {0},猜大啦!当前范围 [{1}-{2}]
12
+ commandDesc: 猜数字小游戏指令
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "koishi-plugin-game-mini",
3
- "version": "0.1.3",
3
+ "version": "0.1.5",
4
4
  "description": "一款简单的猜数字小游戏,支持Bot参与",
5
5
  "main": "lib/index.js",
6
6
  "typings": "lib/index.d.ts",