数当てゲームはメッセージでのみに

This commit is contained in:
syuilo 2018-08-12 23:25:47 +09:00
parent 24af1d80ae
commit c4610894fb
2 changed files with 28 additions and 16 deletions

View file

@ -30,9 +30,16 @@ export default class GuessingGameModule implements IModule {
isEnded: false
});
if (!msg.isMessage) {
if (exist != null) {
msg.reply(serifs.GUESSINGGAME_ARLEADY_STARTED);
} else {
msg.reply(serifs.GUESSINGGAME_PLZ_DM);
}
return true;
}
const secret = Math.floor(Math.random() * 100);
guesses.insertOne({
@ -47,7 +54,7 @@ export default class GuessingGameModule implements IModule {
msg.reply(serifs.GUESSINGGAME_STARTED).then(reply => {
this.ai.subscribeReply(this, msg.userId, msg.isMessage, msg.isMessage ? msg.userId : reply.id);
});
}
return true;
} else {
return false;

View file

@ -42,6 +42,11 @@ export default {
*/
GUESSINGGAME_ARLEADY_STARTED: 'え、ゲームは既に始まってますよ!',
/**
*
*/
GUESSINGGAME_PLZ_DM: 'メッセージでやりましょう!',
/**
*
*/