fhdryjukiuyoljhdgh

This commit is contained in:
Neko Life 2021-06-28 19:30:13 +09:00
parent 27a6ecddc6
commit 5c0d06ec57

View file

@ -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 }