mirror of
				https://github.com/1disk/edp445.git
				synced 2024-08-14 22:47:02 +00:00 
			
		
		
		
	Bug fix #1
Removed the sexbot-ai and sexbot-chat feature due to discord.js error. The cat commands are not working.
This commit is contained in:
		
							parent
							
								
									402d01ceba
								
							
						
					
					
						commit
						0364ed1b38
					
				
					 5 changed files with 44 additions and 12 deletions
				
			
		|  | @ -6,6 +6,7 @@ const fetch = require('node-fetch'); //Import the FETCH API | |||
| const cat = require('./cmd-cat.js') | ||||
| const poll = require('./cmd-poll.js') | ||||
| const gay = require('./cmd-gay.js') | ||||
| const catpion = require('./cmd-catpion.js') | ||||
| const nerdreact = require('./react-nerd.js') | ||||
| const clownreact = require('./react-clown.js') | ||||
| const wreact = require('./react-w.js') | ||||
|  | @ -29,6 +30,10 @@ module.exports = async (message, author, guild, client) => { | |||
|         return gay(message, author, guild, client) | ||||
|     } | ||||
| 
 | ||||
|     if(message.content.includes("cmd captioncat")){ | ||||
|         return catpion(message, author, guild, client) | ||||
|     } | ||||
| 
 | ||||
|     if(message.content.includes("convert image to gif")){ | ||||
|         return togif(message, author, guild, client) | ||||
|     } | ||||
|  |  | |||
|  | @ -15,7 +15,7 @@ module.exports = async (message, author, guild, client) => { | |||
|     const embedcommands = new Discord.MessageEmbed() | ||||
|     .setColor("YELLOW") | ||||
|     .setAuthor("commands", client.user.displayAvatarURL()) | ||||
|     .setDescription("sexbot also has some useful commands!\n \n```@sexbot cmd cat - Get a random cat image\n@sexbot cmd gay - Become gay\n@sexbot poll <message> - Create a poll```\n```@sexbot convert image to gif <url>\n@sexbot convert gif to image <url>\n@sexbot convert video to gif```\n```@sexbot react nerd <messagelink>\n@sexbot react clown <messagelink>\n@sexbot react l <messagelink>\n@sexbot react w <messagelink>```") | ||||
|     .setDescription("sexbot also has some useful commands!\n \n```@sexbot cmd cat - Get a random cat image\n@sexbot cmd captioncat <text> - Generate a cat image that says something\n@sexbot cmd gay - Become gay\n@sexbot poll <message> - Create a poll```\n```@sexbot convert image to gif <url>\n@sexbot convert gif to image <url>\n@sexbot convert video to gif```\n```@sexbot react nerd <messagelink>\n@sexbot react clown <messagelink>\n@sexbot react l <messagelink>\n@sexbot react w <messagelink>```") | ||||
| 
 | ||||
|     message.lineReplyNoMention(embedhelp) | ||||
|     message.channel.send(embedcommands) | ||||
|  |  | |||
							
								
								
									
										27
									
								
								functions/cmd-catpion.js
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										27
									
								
								functions/cmd-catpion.js
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,27 @@ | |||
| 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) => { | ||||
|     var content = message.content.replace(`<@${client.user.id}> `, '') | ||||
|     content = content.replace("cmd captioncat ", '') | ||||
|     fetch(`https://cataas.com/cat/cute/says/${content}?json=true`) | ||||
|     .then((response) => response.json()) | ||||
|     .then((data) => { | ||||
|         const embedload = new Discord.MessageEmbed() | ||||
|         .setColor("GREY") | ||||
|         .setAuthor("cmd captioncat", client.user.displayAvatarURL()) | ||||
|         .setDescription("<a:loading:1046014857939537950>  *Loading...*") | ||||
| 
 | ||||
|         const embedresult = new Discord.MessageEmbed() | ||||
|         .setColor("2f3136") | ||||
|         .setAuthor("cmd captioncat", client.user.displayAvatarURL()) | ||||
|         .setImage(`https://cataas.com${data.url}`) | ||||
| 
 | ||||
|         message.lineReply(embedload).then(m => { | ||||
|             setTimeout(function(){ | ||||
|                 m.edit(':3', embedresult) | ||||
|             }, 1000); | ||||
|         }) | ||||
|     }); | ||||
| } | ||||
							
								
								
									
										2
									
								
								package-lock.json
									
										
									
										generated
									
									
									
								
							
							
						
						
									
										2
									
								
								package-lock.json
									
										
									
										generated
									
									
									
								
							|  | @ -1,5 +1,5 @@ | |||
| { | ||||
|   "name": "sexbot v3", | ||||
|   "name": "sexbot", | ||||
|   "lockfileVersion": 2, | ||||
|   "requires": true, | ||||
|   "packages": { | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue