mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-06 14:20:51 +02:00
Don't mention, respond blank with blank input
This commit is contained in:
@@ -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({
|
||||
|
||||
Reference in New Issue
Block a user