Advertisement
Guest User

Untitled

a guest
Jan 19th, 2019
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 18.73 KB | None | 0 0
  1. const Discord = require("discord.js"); //"Discord" es la constante que se refiere a las funciones de la biblioteca discord.js.
  2. const client = new Discord.Client(); //"client" es la constante que se refiere al bot.
  3. const config = require("./config.json"); //"config" se usa para referirse a los valores del archivo config.json.
  4.  
  5. client.on("ready", () => {
  6. // Este evento se activará cuando el bot inicie su funcionamiento correctamente.
  7. console.log(`Bot iniciado correctamente, funciones`);
  8. //setActivity(...) se usa para actualizar la presencia del bot.
  9. client.user.setActivity(`💉Sucht💉`);
  10. });
  11. client.on("error", (e) => console.error(e)); //Evento de error, necesario para usar los bloques try/catch (cosas más avanzadas).
  12. client.on("warn", (e) => console.warn(e));
  13. client.on("debug", (e) => console.info(e));
  14. client.on("message", async (message) => {
  15. if(message.author.bot) return;
  16. let blacklist = ["mierda", "boludo", "pelotudo", "rata", "hijodeputa",]; //Añade palabras para censurar aquí.
  17. if(blacklist.includes(message.content.toLowerCase())){
  18. try{
  19. message.delete();
  20. message.reply("**Hey!** ```❌🔴Tu mensaje contenia alguna palabra ofensiva y decidi borrarla.🔴❌``` **Manten el respeto.**");
  21. console.log(`El silencio funciona`);
  22. }catch(e){
  23. console.log("Error, consulta a Sans para más información.");
  24. }
  25. } else
  26. if(message.content.toLowerCase().includes("pucha")){
  27. try{
  28. await message.reply("Que sad😓😥")
  29. }catch(e){
  30. console.log("Error, consulta a Sans para más información.");
  31. }
  32. } else
  33.  
  34.  
  35. //Comando Besar -TomyFX
  36.  
  37. if(message.content.toLowerCase().includes("s!besar")){
  38. const embed = new Discord.RichEmbed()
  39. .setTitle(message.author.username)
  40. .setDescription("Te dio un beso 😍💞")
  41. .setColor(0xFF8C00)
  42. .setImage("attachment://Kiss.gif")
  43. .attachFile("path/to/Kiss.gif")
  44. .addBlankField(true) //Notes: Leave at least two blank fields please. -Tomy
  45.  
  46. message.channel.send({embed});
  47. } else
  48.  
  49.  
  50. //Comando Pervert -TomyFX
  51.  
  52. if(message.content.toLowerCase().includes("s!violar")){
  53. const embed = new Discord.RichEmbed()
  54. .setTitle(message.author.username)
  55. .setDescription("Quiere hacer cositas contigo..👀😏")
  56. .addBlankField(true)
  57. .setColor(0xFF8C00)
  58. .setImage("attachment://pervert.gif")
  59. .attachFile("path/to/pervert.gif")
  60.  
  61. message.channel.send({embed});
  62. } else
  63.  
  64.  
  65.  
  66.  
  67. //Comando Acariciar -TomyFX
  68.  
  69. if(message.content.toLowerCase().includes("s!acariciar")){
  70. const embed = new Discord.RichEmbed()
  71. .setTitle(message.author.username)
  72. .setDescription("💞 Te esta dando amor 💞")
  73. .setColor(0xFF8C00)
  74. .setImage("attachment://AMOR.gif")
  75. .attachFile("path/to/AMOR.gif")
  76. .addBlankField(true) //Notes: Leave at least two blank fields please. -Tomy
  77.  
  78. message.channel.send({embed});
  79. } else
  80.  
  81. // Comando [Casamiento] -TomyFX
  82.  
  83. if(message.content.toLowerCase().includes("s!matrimonio")){
  84. const embed = new Discord.RichEmbed()
  85. .setTitle(message.author.username)
  86. .setDescription("💗💖😱 Te esta proponiendo ser su pareja😱💖💗")
  87. .addBlankField(true)
  88. .setColor(0xa700)
  89. .setImage("attachment://casar.gif")
  90. .addField("**💖✅ Para aceptar usa: ✅💖 **",
  91. "```s!si```")
  92. .addBlankField(true)
  93. .addField("**💖❌ Para recahzar usa: ❌💖**",
  94. "```Para rechazar usa: s!no```")
  95. .attachFile("path/to/casar.gif")
  96. .addBlankField(true) //Notes: Leave at least two blank fields please. -Tomy
  97.  
  98. message.channel.send({embed});
  99. } else
  100.  
  101.  
  102. if(message.content.toLowerCase().includes("s!si")){
  103. const embed = new Discord.RichEmbed()
  104. .setTitle(message.author.username)
  105. .setDescription("💗Acepto ser tu pareja!💗")
  106. .addBlankField(true)
  107. .setColor(0xa700)
  108. .setImage("attachment://Si.gif")
  109. .attachFile("path/to/Si.gif")
  110. .addBlankField(true)
  111. .addField("**💖Los declaro marido y mujer!💖**")
  112. .addBlankField(true) //Notes: Leave at least two blank fields please. -Tomy
  113.  
  114. message.channel.send({embed});
  115. } else
  116.  
  117.  
  118. if(message.content.toLowerCase().includes("s!no")){
  119. const embed = new Discord.RichEmbed()
  120. .setTitle(message.author.username)
  121. .setDescription("💔Rechazo tu propuesta💔")
  122. .addBlankField(true)
  123. .setColor(0xa700)
  124. .setImage("attachment://no.gif")
  125. .attachFile("path/to/no.gif")
  126. .addBlankField(true) //Notes: Leave at least two blank fields please. -Tomy
  127.  
  128. message.channel.send({embed});
  129. } else
  130.  
  131.  
  132.  
  133. // Comando asesinar -TomyFX
  134. if(message.content.toLowerCase().includes("s!asesinar")){
  135. const embed = new Discord.RichEmbed()
  136. .setTitle(message.author.username)
  137. .setDescription("🔪💔Te asesino!😨")
  138. .setColor(0xFF8C00)
  139. .setImage("attachment://matar.gif")
  140. .attachFile("path/to/matar.gif")
  141. .addBlankField(true) //Notes: Leave at least two blank fields please. -Tomy
  142. message.channel.send({embed});
  143. } else
  144.  
  145.  
  146.  
  147. // Profile -TomyFX
  148. if(message.content.toLowerCase().includes("s!avatar")){ //Command
  149. const embed = new Discord.RichEmbed() //Richemed
  150. .setTitle("**⭐Mostrando tu avatar⭐**") //Title
  151. .setImage(message.author.avatarURL) //Shows avatar on thumbail mode
  152. .addBlankField(true)
  153.  
  154. message.channel.send({embed}); //Sends the embed
  155.  
  156. } else
  157.  
  158.  
  159. // Comando AYUDA
  160. if(message.content.toLowerCase().includes("s!ayuda")){
  161. const embed = new Discord.RichEmbed()
  162. .setTitle("**🌙Lista de comandos🌙**")
  163. .addBlankField(true)
  164. .setColor(0x00AE86)
  165. .setDescription("**Aqui te muestro la lista de comandos que tengo actualmente:**")
  166. .addBlankField(true)
  167. .setFooter("Si encontraste un bug, reportalo al developer TomyFX, si quieres ver como usar los comandos, escribe: s!2")
  168. .addField("**💉 Comandos de GIFS**",
  169. "```s!acariciar s!besar s!asesinar s!violar```")
  170. .addField("**💉 Palabras a las que reacciono:**",
  171. "```'Pucha' 'Lizbeth' 'Show' 'Triste'``` ")
  172. .addField("**💉 Comandos**",
  173. "```'s!prefix' 's!avatar' 's!informacion' 's!invitacion' 's!report' 's!sugerencia```")
  174. .addField("**❌ Palabras que no permito que menciones ❌**",
  175. "```Boludo , Pelotudo, Mierda```")
  176. .addBlankField(true);
  177.  
  178. message.channel.send({embed});
  179. } else
  180.  
  181.  
  182.  
  183.  
  184. // Comando AYUDA para staff
  185. if(message.content.toLowerCase().includes("s!staff")){
  186. if(!message.member.hasPermission("KICK_MEMBERS")) return message.reply("Lo siento, tu no tienes acceso a ese comando❗");
  187. const embed = new Discord.RichEmbed()
  188. .setTitle("**🌙Lista de comandos para staff🌙**")
  189. .addBlankField(true)
  190. .setColor(0x00AE86)
  191. .setDescription("**Comandos y sus usos.**")
  192. .addBlankField(true)
  193. .setFooter("Si encontraste un bug, reportalo al developer TomyFX.")
  194. .addField("**💉 Como doy un ban❓**",
  195. "```s!ban [@Usuario] (Razon)```")
  196. .addField("**💉 Como doy un kick❓**",
  197. "```s!kick [@Usuario] (Razon)```")
  198. .addField("**💉 Como doy un warn❓**",
  199. "```'!warn [@Usuario] (Razon)```")
  200. .addBlankField(true);
  201.  
  202. message.channel.send({embed});
  203. } else
  204.  
  205.  
  206.  
  207.  
  208.  
  209. //Comando ayuda2
  210. if(message.content.toLowerCase().includes("s!2")){
  211. const embed = new Discord.RichEmbed()
  212. .setTitle("**🚬Como usar los comandos🚬**")
  213. .addBlankField(true)
  214. .setColor(0x00AE86)
  215. .setDescription("*Guia*")
  216. .addBlankField(true)
  217. .setFooter("Si encontraste un bug, reportalo al developer TomyFX.")
  218. .addField("**Como reportar❓**",
  219. "```s!report [Usuario] (Razon del reporte)```")
  220. .addField("**Como dejar una sugerencia❓**",
  221. "```s!sugerencia [Tu @] (Sugerencia)``` ")
  222. .addField("**Como ver tu avatar❓**",
  223. "```s!avatar```")
  224. .addField("**Como ver informacion del servidor❓**",
  225. "```s!informacion```")
  226. .addBlankField(true);
  227.  
  228. message.channel.send({embed});
  229.  
  230. } else
  231.  
  232.  
  233.  
  234. if(message.content.toLowerCase().includes("s!example")){
  235. const embed = new Discord.RichEmbed()
  236. .setTitle("**🌙Welcome to the server!🌙**") // Title for the embed
  237. .setColor(0x00AE86) // Shows the richembed color
  238. .setDescription("*Welcome abord young traveller*") // Description.
  239. .addField("**IP❓**",
  240. "```youripgoeshere.com```")
  241. .addField("**Website❓**",
  242. "```yourwebsitegoeshere```")
  243. .addField("**Hour**:", message.createdAt) // Footer of the embed
  244. .addBlankField(true); // Leaves a blank space
  245.  
  246. message.channel.send({embed}); // Sends the richembed.
  247.  
  248. } else
  249.  
  250.  
  251.  
  252.  
  253.  
  254.  
  255.  
  256.  
  257.  
  258.  
  259.  
  260.  
  261. // Comando Lizbeth [Ejecuta palabra]
  262.  
  263. if(message.content.toLowerCase().includes("lizbeth")){
  264. try{
  265. await message.reply("```Hola amigos, ustedes son pareja?```", {files: ["lizbeth.gif"]})
  266. }catch(e){
  267. console.log("Error, consulta a Sans para más información.");
  268. }
  269. } else
  270.  
  271.  
  272. // Comando [Crear invitacion]
  273.  
  274. if(message.content.toLowerCase().includes("s!invitacion")){
  275. try{
  276. await message.reply("Invitacion del servidor: https://discord.gg/xHuyT7U")
  277. }catch(e){
  278. console.log("Error, consulta a Sans para más información.");
  279. }
  280. } else
  281.  
  282.  
  283.  
  284. // Comando Show [Ejecuta palabra]
  285.  
  286. if(message.content.toLowerCase().includes("show")){
  287. try{
  288. await message.reply("```Ya empezo la rosa de guadalupe?```", {files: ["palomitaa.gif"]})
  289. }catch(e){
  290. console.log("Error, consulta a Sans para más información.");
  291. }
  292. } else
  293.  
  294. // Comando Triste [Ejecuta palabra]
  295.  
  296.  
  297. if(message.content.toLowerCase().includes("triste")){
  298. try{
  299. await message.reply("```Hola amig@ si te encuentras triste queria recordarte que tienes muchas personas que te quiere mucho aqui, y tienes gente que te quiere en el mundo exterior. 💗```", {files: ["abrazo.gif"]})
  300. }catch(e){
  301. console.log("Error, consulta a Sans para más información.");
  302. }
  303. } else
  304.  
  305.  
  306. // Comando de prefix
  307. if(message.content.toLowerCase().includes("s!prefix")){
  308. try{
  309. message.channel.send({files: ["linea.gif"]})
  310. await message.reply("```Mi prefix es: s! 💗```", {files: ["linea.gif"]})
  311. }catch(e){
  312. console.log("Oh Tomy, something went wrong. Check the code you dumbass");
  313. }
  314. } else
  315.  
  316.  
  317. if(message.content.toLowerCase().includes("rango")){
  318. try{
  319. await message.reply("Te daria rango, pero le estoy dando a tu madre💉💉🤤😏")
  320. }catch(e){
  321. console.log("Error, consulta a Sans para más información.");
  322. }
  323. } else
  324.  
  325.  
  326. if(message.content.toLowerCase().includes("s!rule34")){
  327. try{
  328. await message.reply("Jjajaja alto virgo")
  329. }catch(e){
  330. console.log("Error, consulta a Sans para más información.");
  331. }
  332. } else
  333.  
  334. // Comando Careflufla [Ejecuta palabra]
  335.  
  336.  
  337. if(message.content.toLowerCase().includes("careflufla")){
  338. try{
  339. await message.reply("Tiene razon.", {files: ["meme.png"]})
  340. }catch(e){
  341. console.log("Error, consulta a Sans para más información.");
  342. }
  343. } else
  344.  
  345.  
  346. // Configuracion para los prefix's (Comandos)
  347.  
  348. if(!message.content.startsWith(config.prefix)) return;
  349. const args = message.content.slice(config.prefix.length).trim().split(/ +/g);
  350. const command = args.shift().toLowerCase();
  351. const text = args.join(" ");
  352.  
  353.  
  354. // Comando "Conexion"
  355.  
  356. if(command === "conexion") {
  357. message.channel.send(`Tu ping es de 📈: ${m.createdTimestamp - message.createdTimestamp}ms. Mi ping es de📈 ${Math.round(client.ping)}ms`);
  358. } else
  359.  
  360.  
  361. // Comando "Anuncio"
  362.  
  363.  
  364. if(command === "anuncio") {
  365. if(!message.member.hasPermission("MANAGE_MESSAGES")) return message.reply("No puedes hacer eso.");
  366. try{
  367. message.delete();
  368. message.channel.send(text);
  369. }catch(e){
  370. console.log("Error, consulta a Sans para más información.");
  371. }
  372. } else
  373.  
  374.  
  375. // Report Command.
  376.  
  377. if(command === "report") {
  378.  
  379. let rUser = message.mentions.members.first() || message.guild.members.get(args[0]) || message.member;
  380. if(!rUser) return message.channel.send("No pude encontrar al usuario.")
  381. let reason = args.join(" ").slice(22)
  382. const embed = new Discord.RichEmbed()
  383. .setTitle ("**Nuevo reporte❗❗❗**")
  384. .setDescription ("```🥊Detalles:🥊```")
  385. .setColor(0x00AE86)
  386. .addField("⏭**Usuario reportado**", `${rUser} ID: ${rUser.id}`)
  387. .addField("```Reportante:```", `${message.author} ID: ${message.author.id}`)
  388. .addField("**Canal:**", message.channel)
  389. .addField("**Hora**:", message.createdAt)
  390. .addField("```⏭Razon:```", reason);
  391.  
  392. let reportschannel = message.guild.channels.find (`name`, "reportes")
  393. if (!reportschannel) return message.channel.send ("No pude encontrar canal de reportes")
  394.  
  395. message.delete().catch(O_o=>{})
  396. reportschannel.send(embed);
  397.  
  398.  
  399. return;
  400. } else
  401.  
  402.  
  403. // Command para sugerencias
  404.  
  405. if(command === "sugerencia") {
  406.  
  407. let rUser = message.mentions.members.first() || message.guild.members.get(args[0]) || message.member;
  408. if(!message.author) return message.channel.send("Debes proporcionar tu nombre");
  409. let reason = args.join(" ").slice(22)
  410.  
  411. const embed = new Discord.RichEmbed()
  412. .setTitle ("**Sugerencia:**")
  413. .setDescription ("```🥊Detalles:🥊```")
  414. .setColor(0x00AE86)
  415. .addField("```Sugerencia creada por:```", `${message.author}`)
  416. .addField("```⏭El usuario sugiere:```", reason)
  417. .setImage("attachment://RAINBOW.gif")
  418. .attachFile("path/to/RAINBOW.gif")
  419.  
  420. let reportschannel = message.guild.channels.find (`name`, "【💡】‣sugerencias•°☆")
  421. if (!reportschannel) return message.channel.send ("No pude encontrar canal de reportes")
  422.  
  423. message.delete().catch(O_o=>{})
  424. reportschannel.send(embed);
  425.  
  426.  
  427. return;
  428. }
  429.  
  430.  
  431.  
  432.  
  433.  
  434. // Comando "Informacion"
  435.  
  436. if(command === "informacion") {
  437. message.channel.send({embed: {
  438. color: 3447003,
  439. author: {
  440. name: client.user.username,
  441. icon_url: message.avatarURL
  442. },
  443. title: "💉 Informacion del servidor! 💉",
  444. fields: [{
  445. name: "🎮 ━━━━❰SUCHT❱━━━━ 🎮",
  446. value: "・.:.∙┊ Sucht es un servidor en donde puedes socializar y encontrar nuevas amistades, es fácil integrarse y hay variedades de canales para tu entretenimiento┊∙.:.・"
  447. }, {
  448. name: "```**💉 ¸¸.•¨ Ofrecemos: ¨•.¸¸ 💉**```",
  449. value: "❍ Sorteos de todo tipo.`"
  450. }, {
  451. name: "❍ Una variedad de roles y colores. ",
  452. value: "❍ Diferentes niveles.**"
  453. }, {
  454. name: "❍ Staff activo 24/7. ",
  455. value: "❍ Canales variados"
  456. }, {
  457. name: "**\n🕺Miembros totales del servidor🕺**",
  458. value: message.guild.memberCount
  459. }],
  460. timestamp: new Date(),
  461. footer: {
  462. text: "Developed by: TomyFX"
  463. }
  464. }
  465. });
  466. } else
  467.  
  468.  
  469. // Comando "Redes"
  470.  
  471.  
  472.  
  473. // Comando "Anuncio"
  474.  
  475.  
  476. if(command === "anuncio") {
  477. if(!message.member.hasPermission("MANAGE_MESSAGES")) return message.reply("No puedes hacer eso.");
  478. try{
  479. message.delete();
  480. message.channel.send(text);
  481. }catch(e){
  482. console.log("Error, consulta a Sans para más información.");
  483. }
  484. } else
  485.  
  486.  
  487.  
  488. if(command === "sorteo") {
  489. if(!message.member.hasPermission("KICK_MEMBERS")) return message.reply("Lo siento, tu no tienes acceso a ese comando❗");
  490. let rUser = message.mentions.members.first() || message.guild.members.get(args[0]) || message.member;
  491. if(!rUser) return message.channel.send("No pude encontrar al usuario.")
  492. let reason = args.join(" ").slice(22)
  493. const embed = new Discord.RichEmbed()
  494. .setTitle ("**💖🎀🎁 Nuevo sorteo 🎁🎀💖**")
  495. .setDescription ("```⬇Lee la informacion abajo ⬇```")
  496. .setColor(0x00AE86)
  497. .addField("```Informacion:```", reason)
  498. .addField("```Organizador del sorteo:```", `${message.author}`)
  499. .setImage("attachment://RAINBOW.gif")
  500. .attachFile("path/to/RAINBOW.gif")
  501.  
  502. let reportschannel = message.guild.channels.find (`name`, "giveaway")
  503. if (!reportschannel) return message.channel.send ("No pude encontrar canal de reportes")
  504.  
  505. message.delete().catch(O_o=>{})
  506. reportschannel.send(embed);
  507. client.channels.get('CHANNEL ID').send('Hello here!')
  508.  
  509.  
  510. return;
  511. } else
  512.  
  513.  
  514.  
  515.  
  516.  
  517.  
  518. if(command === "kick") {
  519. if(!message.member.hasPermission("KICK_MEMBERS")) return message.reply("Lo siento, tu no tienes acceso a ese comando❗");
  520. let member = message.mentions.members.first() || message.guild.members.get(args[0]);
  521. if(!member)
  522. return message.reply("```⏩ Error❗ Por favor, menciona al usuario que quieres kickear del servidor.```");
  523. if(!member.kickable) return message.reply("No puedo remover a este usuario, tiene mas permisos que yo, o no tengo permisos❗❗");
  524. let reason = args.slice(1).join(' ');
  525. if(!reason) reason = "⏩ No se dio razon para la sancion..";
  526. try{
  527. await member.kick(reason)
  528. message.reply(`${member.user.tag} fue expulsado del servidor! ${message.author.tag} razon: ${reason}`);
  529. }catch(e){
  530. console.log("Error, consulta a Sans para más información.");
  531. }
  532. } else
  533. if(command === "ban") {
  534. if(!message.member.hasPermission("BAN_MEMBERS")) return message.reply("Lo siento, tu no tienes acceso a ese comando❗");
  535. let member = message.mentions.members.first();
  536. if(!member) return message.reply("```⏩ Error❗ Por favor, menciona al usuario que quieres kickear del servidor.```");
  537. if(!member.bannable) return message.reply("No puedo remover a este usuario, tiene mas permisos que yo, o no tengo permisos❗❗");
  538. let reason = args.slice(1).join(' ');
  539. if(!reason) reason = "⏩ No se dio razon para la sancion...";
  540. try{
  541. await member.ban(reason)
  542. message.reply(`${member.user.username} fue baneado por ${message.member.user.username} por: ${reason}`);
  543. }catch(e){
  544. console.log("Error detectado, consulte a Sans para más información.");
  545. }
  546. } else
  547. if(command === "eliminar") {
  548. // Comando de purga de mensajes by Sans, S.A. de C.V. (derechos reservados) (no lo publiques, es mi comando).
  549. let messagesToDelete = args[0];
  550. if(!message.member.hasPermission("MANAGE_MESSAGES")) return message.reply("No puedes hacer eso.");
  551. if(!messagesToDelete) return message.reply("No puedes borrar 0 mensajes.");
  552. if(parseInt(messagesToDelete) == 0) return message.reply("No puedes borrar 0 mensajes.");
  553. if(parseInt(messagesToDelete) > 100) return message.reply("El límite es de 100 mensajes.");
  554. if(parseInt(args[0]) > 0){
  555. try{
  556. await message.delete();
  557. await message.channel.bulkDelete(messagesToDelete);
  558. await message.channel.send(`${messagesToDelete} mensajes borrados.`).then
  559. }catch(e){
  560. console.log("Error detectado, consulte a Sans para más información.");
  561. }
  562. } else { return message.reply("Ingresa un número válido.");}
  563. };
  564. });
  565. client.login(config.token);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement