mirror of
				https://github.com/1disk/edp445.git
				synced 2024-08-14 22:47:02 +00:00 
			
		
		
		
	Changed the big letters of the JS file extension
This commit is contained in:
		
							parent
							
								
									8e6baac2f8
								
							
						
					
					
						commit
						1a9228c002
					
				
					 2 changed files with 0 additions and 77 deletions
				
			
		|  | @ -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; |  | ||||||
| } |  | ||||||
|  | @ -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); |  | ||||||
|    }) |  | ||||||
| } |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue