Show final interaction count

This commit is contained in:
Dragon Fire
2021-03-07 20:39:27 -05:00
parent 57a3bbdbc1
commit b8c8ea9422
4 changed files with 8 additions and 5 deletions
+2
View File
@@ -9,6 +9,7 @@ module.exports = class Cleverbot {
this.channelID = channelID;
this.authorID = authorID;
this.cs = null;
this.interactions = 0;
this.timeout = this.setTimeout();
this.key = key;
}
@@ -29,6 +30,7 @@ module.exports = class Cleverbot {
clearTimeout(this.timeout);
this.timeout = this.setTimeout();
this.cs = body.cs;
this.interactions = Number.parseInt(body.interaction_count, 10);
return body.output || blankResponses[Math.floor(Math.random() * blankResponses.length)];
}