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