hurr durr

This commit is contained in:
Flummi 2017-12-19 11:02:07 +01:00
parent 0cad1160f4
commit 3378acfb49

View File

@ -5,7 +5,7 @@ class cleverbot {
constructor() { constructor() {
this.api = "https://cleverbot.io/1.0"; this.api = "https://cleverbot.io/1.0";
this.nick = ""; this.nick = "";
setTimeout(()=>this.init(), 2000); setTimeout(()=>this.init(), 3000);
} }
init() { init() {
@ -18,14 +18,7 @@ class cleverbot {
json: true json: true
}; };
rp(options) rp(options)
.then(res => { .then(res => this.nick = res.status === "success" ? res.nick: "uwibot")
if(res.status === "success")
this.nick = res.nick;
else {
this.nick = "uwibot";
console.log(res.status);
}
})
.catch(err => console.log(err)); .catch(err => console.log(err));
} }