mirror of
https://github.com/danbulant/Shasha
synced 2026-05-25 21:01:57 +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) {
|
||||
// return axios.post("https://rebot.me/ask", { username: "simsimi", question: message }).then(r => r.data).catch(() => { });
|
||||
console.log(message);
|
||||
const u = message.replace(/( |\n|\t)+/g, "+").slice(0, 1000);
|
||||
console.log(u);
|
||||
return axios.get(`https://api.simsimi.net/v1/?text=${u}&lang=en`).then(r => {
|
||||
console.log(r.data);
|
||||
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(() => { });
|
||||
const u = message.slice(0, 1000);
|
||||
return axios.get(`https://api.simsimi.net/v1/`, {
|
||||
params: {
|
||||
text: u,
|
||||
lang: "en"
|
||||
}
|
||||
}).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 }
|
||||
|
|
|
|||
Loading…
Reference in a new issue