mirror of
https://github.com/danbulant/Shasha
synced 2026-07-07 20:10:56 +00:00
fhdryjukiuyoljhdgh
This commit is contained in:
parent
27a6ecddc6
commit
5c0d06ec57
1 changed files with 7 additions and 7 deletions
|
|
@ -23,13 +23,13 @@ const URL = [
|
||||||
|
|
||||||
async function chatAnswer(message) {
|
async function chatAnswer(message) {
|
||||||
// return axios.post("https://rebot.me/ask", { username: "simsimi", question: message }).then(r => r.data).catch(() => { });
|
// return axios.post("https://rebot.me/ask", { username: "simsimi", question: message }).then(r => r.data).catch(() => { });
|
||||||
console.log(message);
|
const u = message.slice(0, 1000);
|
||||||
const u = message.replace(/( |\n|\t)+/g, "+").slice(0, 1000);
|
return axios.get(`https://api.simsimi.net/v1/`, {
|
||||||
console.log(u);
|
params: {
|
||||||
return axios.get(`https://api.simsimi.net/v1/?text=${u}&lang=en`).then(r => {
|
text: u,
|
||||||
console.log(r.data);
|
lang: "en"
|
||||||
return r.data.success.replace(/Sim doesn't know what you are talking about. Please teach me/, "Sorry but i don't speak gibberish");
|
}
|
||||||
}).catch(() => { });
|
}).then(r => r.data.success.replace(/Sim doesn't know what you are talking about. Please teach me/, "Sorry but i don't speak gibberish")).catch(() => { });
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports = { chatAnswer }
|
module.exports = { chatAnswer }
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue