mirror of
https://github.com/nullnyat/NullcatChan.git
synced 2025-04-29 13:57:20 +09:00
Fix bug
This commit is contained in:
parent
d426e17a19
commit
1480e3d2a4
@ -91,6 +91,8 @@ export default class GuessingGameModule implements IModule {
|
|||||||
|
|
||||||
const firsttime = exist.tries.indexOf(g) === -1;
|
const firsttime = exist.tries.indexOf(g) === -1;
|
||||||
|
|
||||||
|
exist.tries.push(g);
|
||||||
|
|
||||||
let text: string;
|
let text: string;
|
||||||
let end = false;
|
let end = false;
|
||||||
|
|
||||||
@ -110,13 +112,11 @@ export default class GuessingGameModule implements IModule {
|
|||||||
if (end) {
|
if (end) {
|
||||||
exist.isEnded = true;
|
exist.isEnded = true;
|
||||||
exist.endedAt = Date.now();
|
exist.endedAt = Date.now();
|
||||||
guesses.update(exist);
|
|
||||||
this.ai.unsubscribeReply(this, msg.userId);
|
this.ai.unsubscribeReply(this, msg.userId);
|
||||||
} else {
|
|
||||||
exist.tries.push(g);
|
|
||||||
guesses.update(exist);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
guesses.update(exist);
|
||||||
|
|
||||||
msg.reply(text).then(reply => {
|
msg.reply(text).then(reply => {
|
||||||
if (!end) {
|
if (!end) {
|
||||||
this.ai.subscribeReply(this, msg.userId, msg.isMessage, reply.id);
|
this.ai.subscribeReply(this, msg.userId, msg.isMessage, reply.id);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user