From d426e17a19441fa65f04b2f2b33d004637fbc89e Mon Sep 17 00:00:00 2001 From: syuilo Date: Sun, 12 Aug 2018 23:27:29 +0900 Subject: [PATCH] Check number --- src/modules/guessing-game/index.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/modules/guessing-game/index.ts b/src/modules/guessing-game/index.ts index a1cc139..600cac8 100644 --- a/src/modules/guessing-game/index.ts +++ b/src/modules/guessing-game/index.ts @@ -85,6 +85,8 @@ export default class GuessingGameModule implements IModule { this.ai.subscribeReply(this, msg.userId, msg.isMessage, reply.id); }); } else { + if (guess.length > 3) return; + const g = parseInt(guess, 10); const firsttime = exist.tries.indexOf(g) === -1;