diff --git a/functions/AI.JS b/functions/AI.JS deleted file mode 100644 index 52f26c5..0000000 --- a/functions/AI.JS +++ /dev/null @@ -1,56 +0,0 @@ -module.exports = async (message, author) => { - var msc = message.toLowerCase() - - var compliment = require('./detections/compliment.js') - var insult = require('./detections/insult.js') - var neutral = require('./detections/neutral.js') - var questionyon = require('./detections/question-yon.js') - var or = require('./detections/or.js') - var additionalreaction = require('./detections/additional-reaction.js') - - var final; - - //look for compliments - compliment(msc).detections.some(element => { - if (msc.includes(element)) { - final = compliment(msc, author).reply - return; - } - }); - - //look for insults - insult(msc).detections.some(element => { - if (msc.includes(element)) { - final = insult(msc, element, author).reply - return; - } - }); - - //look for a yes or no question - questionyon(msc).detections.some(element => { - if (msc.includes(element)) { - final = questionyon(msc, author).reply - return; - } - }); - - or(msc).detections.some(element => { - if (msc.includes(element)) { - final = or(msc, author).reply - return; - } - }); - - additionalreaction(msc).detections.some(element => { - if (msc.includes(element)) { - final = additionalreaction(msc, author).reply - return; - } - }); - - if(!final){ - final = neutral(msc, author).reply - } - - return final; -} \ No newline at end of file diff --git a/functions/cleverbot.JS b/functions/cleverbot.JS deleted file mode 100644 index 31a4da8..0000000 --- a/functions/cleverbot.JS +++ /dev/null @@ -1,21 +0,0 @@ -const Discord = require('discord.js') //Import Discord API -require('discord-inline-reply'); //Import inline replies for Discord API -const fetch = require('node-fetch'); //Import the FETCH API - -module.exports = async (message, author, guild, client) => { - const cleverbot = require('cleverbot-free') //Install the cleverbot api - - var text = message.content.replace(`<@${client.user.id}> botai `, '') - let conversation = [] //History of the conversation - - cleverbot(text, conversation).then(res => { - conversation.push(text) - conversation.push(res) - - message.channel.startTyping(); - setTimeout(function(){ - message.channel.stopTyping(); - return message.lineReply(res) - }, 2000); - }) -} \ No newline at end of file