This commit is contained in:
Flummi
2019-11-19 04:45:54 +01:00
parent 2988582905
commit e1b72f0f47
6 changed files with 63 additions and 4 deletions

View File

@@ -19,7 +19,7 @@ export default new class cleverbot {
fetch(`${this.api}/create`, options)
.then(res => res.json())
.then(res => this.nick = res.status === "success" ? res.nick: "uwibot")
.catch(err => console.log(err));
.catch(err => console.log("cleverbot is offline or whatever lol"));
}
ask(msg) {
@@ -37,7 +37,7 @@ export default new class cleverbot {
fetch(`${this.api}/ask`, options)
.then(res => res.json())
.then(res => res.status === "success"?resolve(res):reject(res.status))
.catch(err => reject(err));
.catch(err => reject("cleverbot is offline or whatever lol"));
});
}
};