Don't mention, respond blank with blank input

This commit is contained in:
Dragon Fire
2021-03-06 13:57:19 -05:00
parent a37a2c051b
commit e37f66c8cc
2 changed files with 6 additions and 2 deletions
+5
View File
@@ -15,6 +15,11 @@ module.exports = class Cleverbot {
}
async respond(input) {
if (!input) {
clearTimeout(this.timeout);
this.timeout = this.setTimeout();
return blankResponses[Math.floor(Math.random() * blankResponses.length)];
}
const { body } = await request
.get('https://www.cleverbot.com/getreply')
.query({