Advertisement
Guest User

lastone

a guest
Oct 18th, 2019
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 62.05 KB | None | 0 0
  1. console.log('SOCIALIZE ME is ready');
  2. const http = require('http');
  3. const express = require('express');
  4. const app = express();
  5. app.get("/", (request, response) => {
  6. console.log(Date.now() + " Ping Received");
  7. response.sendStatus(200);
  8. });
  9. app.listen(process.env.PORT);
  10. setInterval(() => {
  11. http.get(`http://${process.env.PROJECT_DOMAIN}.glitch.me/`);
  12. }, 280000);
  13.  
  14.  
  15.  
  16.  
  17. const Discord = require('discord.js');
  18. const client = new Discord.Client();
  19.  
  20.  
  21. const fs = require("fs");
  22. let tickets = JSON.parse(fs.readFileSync("/app/tickets.json", "utf8"));
  23. let pregnant = JSON.parse(fs.readFileSync("/app/pregnant.json", "utf8"));
  24.  
  25.  
  26. var anothershop = false;
  27. var craterunning = false;
  28. var in_process2 = false;
  29. var messanger = 0;
  30. var messangerRare = 0;
  31.  
  32. const jckpotused = new Set();
  33. const crateused = new Set();
  34.  
  35. const falsifyused = new Set();
  36. const thiefused = new Set();
  37.  
  38.  
  39. client.on('ready', () => {
  40. console.log(`Logged in as ${client.user.tag}!`);
  41. client.user.setActivity("SOCIALIZEME SHOP.", { type: "WATCHING"})
  42.  
  43. });
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53. client.on('message', (message) => {
  54.  
  55. var pack = message.guild.roles.find(role => role.name === "πŸ’Ÿ");
  56. var rep = message.guild.roles.find(role => role.name === "⭐");
  57. var knife = message.guild.roles.find(role => role.name === "πŸ”ͺ");
  58. var cream = message.guild.roles.find(role => role.name === "🍨");
  59. var ring = message.guild.roles.find(role => role.name === "πŸ’");
  60. var tiger = message.guild.roles.find(role => role.name === "🐯");
  61. var dinner = message.guild.roles.find(role => role.name === "🍾");
  62. var fame = message.guild.roles.find(role => role.name === "HALL OF FAME");
  63. var shop = message.guild.roles.find(role => role.name === "β˜†β”β”β”SHOPβ”β”β”β˜†");
  64.  
  65.  
  66. //help
  67. if (message.content == "!helpme") {
  68.  
  69. let embed = new Discord.RichEmbed()
  70. .setColor(0x00AE86)
  71. .setTitle("```πŸ›οΈSOCIALIZEME SHOPπŸ›οΈ\n\n*Type !shop to buy items.\n*Type !currency @mention to check someone's stats.\n*Type !tickets @mention to gift someone with tickets.\n*Type !jackp for a chance to win tickets.\n*Type !crate for a chance to win tickets.\n```")
  72. .setDescription("```β˜†β”β”β”ITERACTION COMMANDSβ”β”β”β˜†\n\n*Type !falsify to create tickets with your Magic Ring.\n*Type !steal @mention to attempt stealing tickets from someone with your knife.\n*Type +rep @mention to give good reputation points to someone.\n*Type -rep @mention to give bad reputation points to someone.\n*Type !gift πŸ’Ÿ @mention to gift commands packs.\n*Type !gift 🍨 @mention to gift an icecream and win good reputation.\n*Type !gift 🍾 @mention to invite someone for dinner and win good reputation.\n*Type !gift 🐯 @mention to gift this item.\n\nβ˜†β”β”β”EMOTION COMMANDSβ”β”β”β˜†\n\n*Type !pregnant, !shoot, !insult, !base, !pat, !lick, !hug, !sex, !kiss or !hit @mention to activate the designated command. ```")
  73. message.channel.send({embed});
  74. };
  75.  
  76.  
  77.  
  78. //shop
  79. if (message.content == '!shop') {
  80.  
  81.  
  82.  
  83. if(anothershop){message.reply("There is another shop command in process. React to buy an item!β›”");return;}
  84. anothershop = true;
  85.  
  86. const tick = client.emojis.find(emoji => emoji.name === "ticket");
  87.  
  88. let embed = new Discord.RichEmbed()
  89. .setTitle(`πŸ›οΈSOCIALIZE ME SHOPπŸ›οΈ.\n*React to buy items.\n*Type !currency to check your own amount of tickets.\n`)
  90. .setDescription(`|πŸ’Ÿ Commands Pack x10.[used for hugs, kisses etc.] ${tick} 5 SocializeMe Tickets.\n\n|⭐ Reputation Pack x10.[used to give good or bad Rep. Points to others users.] ${tick} 5 SocializeMe Tickets.\n\n|βœ… Broom. [Cleans bad reputation.] ${tick} 50 SocializeMe Tickets.\n\n|πŸ† HALL OF FAME ROLE ${tick} 100 SocializeMe Tickets.\n\n|πŸ”ͺ Knife.[You can steal people's tickets.] ${tick} 70 SocializeMe Tickets.\n\n|🍨 Icecream.[Gift it to win +2 reputation points.] ${tick} 15 SocializeMe Tickets.\n\n|πŸ’ Magic Ring.[Used to falsify tickets.] ${tick} 50 SocializeMe Tickets.\n\n|🐯 Tiger.[Keeps your tickets safe against thieves.] ${tick} 10 SocializeMe Tickets.\n\n|🍾 Romantic Dinner. [Gift it to gain +5 reputation points.] ${tick} 20 SocializeMe Tickets.\n\n|🏧 Sell. [Sell your rare items by 15 ${tick} SocializeMe Tickets]\n\n`)
  91. .setFooter("Type !helpme to get a list of all available commands.")
  92. .setColor("#55FFFF")
  93.  
  94. message.channel.send({embed: embed}).then(embedMessage => {
  95.  
  96. embedMessage.react("πŸ†")
  97. .then(() => embedMessage.react("πŸ’Ÿ"))
  98. .then(() => embedMessage.react("⭐"))
  99. .then(() => embedMessage.react("βœ…"))
  100. .then(() => embedMessage.react("πŸ”ͺ"))
  101. .then(() => embedMessage.react("🍨"))
  102. .then(() => embedMessage.react("πŸ’"))
  103. .then(() => embedMessage.react("🐯"))
  104. .then(() => embedMessage.react("🍾"))
  105. .then(() => embedMessage.react("🏧"))
  106.  
  107. .catch(() => console.error('One of the emojis failed to react.'));
  108.  
  109. const collector = embedMessage.createReactionCollector((reaction, user) =>user.id != "633719438398586880" && (reaction.emoji.name === 'πŸ†'|| reaction.emoji.name === 'πŸ’Ÿ' || reaction.emoji.name === '⭐' || reaction.emoji.name === 'βœ…' || reaction.emoji.name === 'πŸ”ͺ' || reaction.emoji.name === '🍨' || reaction.emoji.name === 'πŸ’' || reaction.emoji.name === '🐯'|| reaction.emoji.name === '🍾' || reaction.emoji.name === '🏧')).once("collect", reaction => {
  110. const chosen = reaction.emoji.name;
  111.  
  112.  
  113.  
  114. if(chosen === 'πŸ†'){
  115. if (!reaction.message.guild.member(reaction.users.last()).roles.find("name", "β˜†β”β”β”SHOPβ”β”β”β˜†")){reaction.message.guild.member(reaction.users.last()).addRole(shop);}
  116. if (reaction.message.guild.member(reaction.users.last()).roles.find("name", "HALL OF FAME")){message.channel.send("```πŸ† You already own this item.\n\n*Type !shop to see the available items to buy.```");anothershop = false;embedMessage.delete();return;}
  117.  
  118.  
  119. if (!tickets[reaction.users.last().id]) tickets[reaction.users.last().id] = {currenttickets:5,pack:0,grep:0,brep:0,rep:0,rareitem:0};
  120. let userData = tickets[reaction.users.last().id];
  121.  
  122.  
  123.  
  124. embedMessage.delete()
  125. if(userData.currenttickets <100) {message.channel.send("```You don't have enough SocializeMe Tickets to buy this item.\n\n*Type !jackp or !crate for a chance to win some.```");anothershop = false;return;}
  126.  
  127.  
  128. userData.currenttickets = (parseInt (userData.currenttickets) - parseInt (100));
  129. fs.writeFile("/app/tickets.json", JSON.stringify(tickets), (err) => {if (err) console.error(err)});
  130.  
  131.  
  132. let embed = new Discord.RichEmbed()
  133. .setColor(0x00AE86)
  134. .setTitle(`Nice ${reaction.users.last().username} you bought the πŸ† HALL OF FAME ROLE.\n\n*Check the very bottom of your roles list to see the items you own.\n\n*Type !shop to see the available items to buy.\n\n*Type !gift @mention to gift someone with some of your items.`)
  135. message.channel.send({embed});
  136. reaction.message.guild.member(reaction.users.last()).addRole(fame)
  137.  
  138. anothershop = false;
  139.  
  140. }
  141.  
  142.  
  143.  
  144. if(chosen === 'πŸ’Ÿ'){
  145. if (!reaction.message.guild.member(reaction.users.last()).roles.find("name", "β˜†β”β”β”SHOPβ”β”β”β˜†")){reaction.message.guild.member(reaction.users.last()).addRole(shop);}
  146. //if (reaction.message.guild.member(reaction.users.last()).roles.find("name", "πŸ’Ÿ")){message.channel.send("```πŸ’Ÿ You already own this item.\n\n*Type !shop to see the available items to buy.```");anothershop = false;embedMessage.delete();return;}
  147.  
  148.  
  149. if (!tickets[reaction.users.last().id]) tickets[reaction.users.last().id] = {currenttickets:5,pack:0,grep:0,brep:0,rep:0,rareitem:0};
  150. let userData = tickets[reaction.users.last().id];
  151.  
  152.  
  153.  
  154. embedMessage.delete()
  155. if(userData.currenttickets <5) {message.channel.send("```You don't have enough SocializeMe Tickets to buy this item.\n\n*Type !jackp or !crate for a chance to win some.```");anothershop = false;return;}
  156.  
  157.  
  158. userData.currenttickets = (parseInt (userData.currenttickets) - parseInt (5));
  159. userData.pack = (parseInt (userData.pack) + parseInt (10));
  160. fs.writeFile("/app/tickets.json", JSON.stringify(tickets), (err) => {if (err) console.error(err)});
  161.  
  162.  
  163. let embed = new Discord.RichEmbed()
  164. .setColor(0x00AE86)
  165. .setTitle(`Nice ${reaction.users.last().username} you bought a πŸ’Ÿ Command Pack.\n\n*Check the very bottom of your roles list to see the items you own.\n\n*Type !shop to see the available items to buy.\n\n*Type !gift @mention to gift someone with some of your items.`)
  166. message.channel.send({embed});
  167. reaction.message.guild.member(reaction.users.last()).addRole(pack)
  168. anothershop = false;
  169.  
  170. }
  171.  
  172.  
  173. if(chosen === '⭐'){
  174. if (!reaction.message.guild.member(reaction.users.last()).roles.find("name", "β˜†β”β”β”SHOPβ”β”β”β˜†")){reaction.message.guild.member(reaction.users.last()).addRole(shop);}
  175. //if (reaction.message.guild.member(reaction.users.last()).roles.find("name", "⭐")){message.channel.send("```⭐ You already own this item.\n\n*Type !shop to see the available items to buy.```");anothershop = false;embedMessage.delete();return;}
  176.  
  177.  
  178. if (!tickets[reaction.users.last().id]) tickets[reaction.users.last().id] = {currenttickets:5,pack:0,grep:0,brep:0,rep:0,rareitem:0};
  179. let userData = tickets[reaction.users.last().id];
  180.  
  181.  
  182.  
  183. embedMessage.delete()
  184. if(userData.currenttickets <5) {message.channel.send("```You don't have enough SocializeMe Tickets to buy this item.\n\n*Type !jackp or !crate for a chance to win some.```");anothershop = false;return;}
  185.  
  186.  
  187. userData.currenttickets = (parseInt (userData.currenttickets) - parseInt (5));
  188. userData.rep = (parseInt (userData.rep) + parseInt (10));
  189. fs.writeFile("/app/tickets.json", JSON.stringify(tickets), (err) => {if (err) console.error(err)});
  190.  
  191.  
  192. let embed = new Discord.RichEmbed()
  193. .setColor(0x00AE86)
  194. .setTitle(`Nice ${reaction.users.last().username} you bought a ⭐ Reputation Points Pack.\n\n*Check the very bottom of your roles list to see the items you own.\n\n*Type !shop to see the available items to buy.\n\n*Type !gift @mention to gift someone with some of your items.`)
  195. message.channel.send({embed});
  196. reaction.message.guild.member(reaction.users.last()).addRole(rep)
  197. anothershop = false;
  198.  
  199. }
  200.  
  201.  
  202. if(chosen === 'βœ…'){
  203. if (!reaction.message.guild.member(reaction.users.last()).roles.find("name", "β˜†β”β”β”SHOPβ”β”β”β˜†")){reaction.message.guild.member(reaction.users.last()).addRole(shop);}
  204.  
  205. if (!tickets[reaction.users.last().id]) tickets[reaction.users.last().id] = {currenttickets:5,pack:0,grep:0,brep:0,rep:0,rareitem:0};
  206. let userData = tickets[reaction.users.last().id];
  207.  
  208.  
  209. embedMessage.delete()
  210. if(userData.brep ==0) {message.channel.send("```You don't have a bad reputation.```");anothershop = false;return;}
  211. if(userData.currenttickets <50) {message.channel.send("```You don't have enough SocializeMe Tickets to buy this item.\n\n*Type !jackp or !crate for a chance to win some.```");anothershop = false;return;}
  212.  
  213.  
  214. userData.currenttickets = (parseInt (userData.currenttickets) - parseInt (50));
  215. userData.brep = 0;
  216. userData.grep = 0;
  217. fs.writeFile("/app/tickets.json", JSON.stringify(tickets), (err) => {if (err) console.error(err)});
  218.  
  219.  
  220. let embed = new Discord.RichEmbed()
  221. .setColor(0x00AE86)
  222. .setTitle(`Nice ${reaction.users.last().username} You have βœ… cleared your reputation.\n\n* Check the very bottom of your roles list to see the items you own.\n\n*Type !shop to see the available items to buy.\n\n*Type !gift @mention to gift someone with some of your items.`)
  223. message.channel.send({embed});
  224. anothershop = false;
  225.  
  226. }
  227.  
  228.  
  229.  
  230.  
  231. if(chosen === 'πŸ”ͺ'){
  232. if (!reaction.message.guild.member(reaction.users.last()).roles.find("name", "β˜†β”β”β”SHOPβ”β”β”β˜†")){reaction.message.guild.member(reaction.users.last()).addRole(shop);}
  233. if (reaction.message.guild.member(reaction.users.last()).roles.find("name", "πŸ”ͺ")){message.channel.send("```πŸ”ͺ You already own this item.\n\n*Type !shop to see the available items to buy.```");anothershop = false;embedMessage.delete();return;}
  234.  
  235.  
  236. if (!tickets[reaction.users.last().id]) tickets[reaction.users.last().id] = {currenttickets:5,pack:0,grep:0,brep:0,rep:0,rareitem:0};
  237. let userData = tickets[reaction.users.last().id];
  238.  
  239.  
  240.  
  241. embedMessage.delete()
  242. if(userData.currenttickets <70) {message.channel.send("```You don't have enough SocializeMe Tickets to buy this item.\n\n*Type !jackp or !crate for a chance to win some.```");anothershop = false;return;}
  243.  
  244.  
  245. userData.currenttickets = (parseInt (userData.currenttickets) - parseInt (70));
  246. fs.writeFile("/app/tickets.json", JSON.stringify(tickets), (err) => {if (err) console.error(err)});
  247.  
  248.  
  249. let embed = new Discord.RichEmbed()
  250. .setColor(0x00AE86)
  251. .setTitle(`Nice ${reaction.users.last().username} you bought a πŸ”ͺ.\n\n* Check the very bottom of your roles list to see the items you own.\n\n*Type !shop to see the available items to buy.\n\n*Type !gift @mention to gift someone with some of your items.`)
  252. message.channel.send({embed});
  253. reaction.message.guild.member(reaction.users.last()).addRole(knife)
  254. anothershop = false;
  255.  
  256. }
  257.  
  258.  
  259.  
  260. if(chosen === '🍨'){
  261. if (!reaction.message.guild.member(reaction.users.last()).roles.find("name", "β˜†β”β”β”SHOPβ”β”β”β˜†")){reaction.message.guild.member(reaction.users.last()).addRole(shop);}
  262. if (reaction.message.guild.member(reaction.users.last()).roles.find("name", "🍨")){message.channel.send("```🍨 You already own this item.\n\n*Type !shop to see the available items to buy.```");anothershop = false;embedMessage.delete();return;}
  263.  
  264.  
  265. if (!tickets[reaction.users.last().id]) tickets[reaction.users.last().id] = {currenttickets:5,pack:0,grep:0,brep:0,rep:0,rareitem:0};
  266. let userData = tickets[reaction.users.last().id];
  267.  
  268.  
  269.  
  270. embedMessage.delete()
  271. if(userData.currenttickets <15) {message.channel.send("```You don’t have enough SocializeMe Tickets to buy this item.\n\n*Type !jackp or !crate for a chance to win some.```");anothershop = false;return;}
  272.  
  273.  
  274. userData.currenttickets = (parseInt (userData.currenttickets) - parseInt (15));
  275. fs.writeFile("/app/tickets.json", JSON.stringify(tickets), (err) => {if (err) console.error(err)});
  276.  
  277.  
  278. let embed = new Discord.RichEmbed()
  279. .setColor(0x00AE86)
  280. .setTitle(`Nice ${reaction.users.last().username} you bought a 🍨.\n\n* Check the very bottom of your roles list to see the items you own.\n\n*Type !shop to see the available items to buy.\n\n*Type !gift @mention to gift someone with some of your items.`)
  281. message.channel.send({embed});
  282. reaction.message.guild.member(reaction.users.last()).addRole(cream)
  283. anothershop = false;
  284.  
  285. }
  286.  
  287. if(chosen === 'πŸ’'){
  288. if (!reaction.message.guild.member(reaction.users.last()).roles.find("name", "β˜†β”β”β”SHOPβ”β”β”β˜†")){reaction.message.guild.member(reaction.users.last()).addRole(shop);}
  289. if (reaction.message.guild.member(reaction.users.last()).roles.find("name", "πŸ’")){message.channel.send("```πŸ’ You already own this item.\n\n*Type !shop to see the available items to buy.```");anothershop = false;embedMessage.delete();return;}
  290.  
  291. if (!tickets[reaction.users.last().id]) tickets[reaction.users.last().id] = {currenttickets:5,pack:0,grep:0,brep:0,rep:0,rareitem:0};
  292. let userData = tickets[reaction.users.last().id];
  293. embedMessage.delete()
  294.  
  295. if(userData.currenttickets <50) {message.channel.send("```You don’t have enough SocializeMe Tickets to buy this item.\n\n*Type !jackp or !crate for a chance to win some.```");anothershop = false;return;}
  296.  
  297.  
  298. userData.currenttickets = (parseInt (userData.currenttickets) - parseInt (50));
  299. fs.writeFile("/app/tickets.json", JSON.stringify(tickets), (err) => {if (err) console.error(err)});
  300.  
  301.  
  302. let embed = new Discord.RichEmbed()
  303. .setColor(0x00AE86)
  304. .setTitle(`Nice ${reaction.users.last().username} you bought a πŸ’.\n\n* Check the very bottom of your roles list to see the items you own.\n\n*Type !shop to see the available items to buy.\n\n*Type !gift @mention to gift someone with some of your items.`)
  305. message.channel.send({embed});
  306. anothershop = false;
  307.  
  308. reaction.message.guild.member(reaction.users.last()).addRole(ring)
  309.  
  310. }
  311.  
  312. if(chosen === '🐯'){
  313. if (!reaction.message.guild.member(reaction.users.last()).roles.find("name", "β˜†β”β”β”SHOPβ”β”β”β˜†")){reaction.message.guild.member(reaction.users.last()).addRole(shop);}
  314. if (reaction.message.guild.member(reaction.users.last()).roles.find("name", "🐯")){message.channel.send("```🐯 You already own this item.\n\n*Type !shop to see the available items to buy.```");anothershop = false;embedMessage.delete();return;}
  315.  
  316.  
  317. if (!tickets[reaction.users.last().id]) tickets[reaction.users.last().id] = {currenttickets:5,pack:0,grep:0,brep:0,rep:0,rareitem:0};
  318. let userData = tickets[reaction.users.last().id];
  319.  
  320.  
  321.  
  322. embedMessage.delete()
  323. if(userData.currenttickets <10) {message.channel.send("```You don’t have enough SocializeMe Tickets to buy this item.\n\n*Type !jackp or !crate to win some.```");anothershop = false;return;}
  324.  
  325.  
  326. userData.currenttickets = (parseInt (userData.currenttickets) - parseInt (10));
  327. fs.writeFile("/app/tickets.json", JSON.stringify(tickets), (err) => {if (err) console.error(err)});
  328.  
  329.  
  330. let embed = new Discord.RichEmbed()
  331. .setColor(0x00AE86)
  332. .setTitle(`Nice ${reaction.users.last().username} you bought a 🐯.\n\n* Check the very bottom of your roles list to see the items you own.\n\n*Type !shop to see the available items to buy.\n\n*Type !gift @mention to gift someone with some of your items.`)
  333. message.channel.send({embed});
  334. reaction.message.guild.member(reaction.users.last()).addRole(tiger)
  335. anothershop = false;
  336.  
  337. }
  338.  
  339. if(chosen === '🍾'){
  340. if (!reaction.message.guild.member(reaction.users.last()).roles.find("name", "β˜†β”β”β”SHOPβ”β”β”β˜†")){reaction.message.guild.member(reaction.users.last()).addRole(shop);}
  341. if (reaction.message.guild.member(reaction.users.last()).roles.find("name", "🍾")){message.channel.send("```🍾 You already own this item.\n\n*Type !shop to see the available items to buy.```");anothershop = false;embedMessage.delete();return;}
  342.  
  343.  
  344. if (!tickets[reaction.users.last().id]) tickets[reaction.users.last().id] = {currenttickets:5,pack:0,grep:0,brep:0,rep:0,rareitem:0};
  345. let userData = tickets[reaction.users.last().id];
  346. const tick = client.emojis.find(emoji => emoji.name === "ticket");
  347.  
  348.  
  349. embedMessage.delete()
  350. if(userData.currenttickets <20) {message.channel.send("```You don’t have enough SocializeMe Tickets to buy this item.\n\n*Type !jackp or !crate for a chance to win some.```");anothershop = false;return;}
  351.  
  352.  
  353. userData.currenttickets = (parseInt (userData.currenttickets) - parseInt (20));
  354. fs.writeFile("/app/tickets.json", JSON.stringify(tickets), (err) => {if (err) console.error(err)});
  355.  
  356.  
  357. let embed = new Discord.RichEmbed()
  358. .setColor(0x00AE86)
  359. .setTitle(`Nice ${reaction.users.last().username} you bought a 🍾 Romantic Dinner.\n\n* Check the very bottom of your roles list to see the items you own.\n\n*Type !shop to see the available items to buy.\n\n*Type !gift @mention to gift someone with some of your items.`)
  360. message.channel.send({embed});
  361. reaction.message.guild.member(reaction.users.last()).addRole(dinner)
  362. anothershop = false;
  363.  
  364. }
  365.  
  366. if(chosen === '🏧'){
  367. if (!reaction.message.guild.member(reaction.users.last()).roles.find("name", "β˜†β”β”β”SHOPβ”β”β”β˜†")){reaction.message.guild.member(reaction.users.last()).addRole(shop);}
  368.  
  369. if (!tickets[reaction.users.last().id]) tickets[reaction.users.last().id] = {currenttickets:5,pack:0,grep:0,brep:0,rep:0,rareitem:0};
  370. let userData = tickets[reaction.users.last().id];
  371.  
  372.  
  373. embedMessage.delete()
  374. if(userData.rareitem ==0) {message.channel.send("```You don’t have any rare items to sell.```");anothershop = false;return;}
  375.  
  376. let embed = new Discord.RichEmbed()
  377. .setColor(0x00AE86)
  378. .setTitle(`Nice ${reaction.users.last().username} You sold all of ( ${userData.rareitem} ) your rare items for ${tick} ${15*userData.rareitem} SocializeMe Tickets.\n\n*Type !shop to see the available items to buy.\n\n*Type !gift @mention to gift someone with some of your items.`)
  379. message.channel.send({embed});
  380. anothershop = false;
  381.  
  382. userData.currenttickets = (parseInt (userData.currenttickets) + parseInt (15 * userData.rareitem));
  383.  
  384. fs.writeFile("/app/tickets.json", JSON.stringify(tickets), (err) => {if (err) console.error(err)});
  385.  
  386. }
  387.  
  388.  
  389. collector.stop()} );
  390.  
  391. })
  392. }
  393.  
  394.  
  395. //admdrop
  396. //send tickets
  397. if (message.content == "!admdrop") {
  398. if(!message.guild.member(message.author).hasPermission("KICK_MEMBERS"))return;
  399. message.delete();
  400.  
  401. let user3 = message.guild.members.random().user;
  402. var rand_resultickets2 = [Math.floor(Math.random(2) * 5)]
  403. const tick = client.emojis.find(emoji => emoji.name === "ticket");
  404.  
  405. let embed = new Discord.RichEmbed()
  406. .setTitle(`REACT TO CLAIM ***${rand_resultickets2}*** ${tick} SocializeMe Tickets.\n\n`)
  407. .setImage("https://cdn.glitch.com/d9506906-5b85-48a9-963e-e99d5e12445b%2Fticketsss.gif")
  408. .setColor("#55FFFF")
  409.  
  410. message.guild.channels.get('552628987487059989').send({embed: embed}).then(embedMessage => {
  411. embedMessage.react("πŸ‘")
  412. .catch(() => console.error('One of the emojis failed to react.'));
  413.  
  414. const collector = embedMessage.createReactionCollector((reaction, user) =>user.id != "633719438398586880" && (reaction.emoji.name === 'πŸ‘')).once("collect", reaction => {
  415. const chosen = reaction.emoji.name;
  416.  
  417.  
  418.  
  419. if(chosen === 'πŸ‘'){
  420. if (!tickets[reaction.users.last().id]) tickets[reaction.users.last().id] = {currenttickets:5,pack:0,grep:0,brep:0,rep:0,rareitem:0};
  421. let userData = tickets[reaction.users.last().id];
  422. userData.currenttickets = (parseInt (userData.currenttickets) + parseInt (rand_resultickets2));
  423. userData.brep = (parseInt (userData.brep) + parseInt (1));
  424. fs.writeFile("/app/tickets.json", JSON.stringify(tickets), (err) => {if (err) console.error(err)});
  425.  
  426.  
  427. let embed = new Discord.RichEmbed()
  428. .setColor(0x00AE86)
  429. .setTitle(`${reaction.users.last().username} has claimed ${rand_resultickets2} ${tick} SocializeMe Tickets for himself/herself.`)
  430. message.channel.send({embed});
  431.  
  432. }
  433.  
  434.  
  435. collector.stop()});
  436. });
  437.  
  438. }
  439.  
  440.  
  441.  
  442. //currency
  443. if (message.content.includes ("!currency")) {
  444. const tick = client.emojis.find(emoji => emoji.name === "ticket");
  445. let user2 = message.mentions.users.first();
  446. if (!user2) {user2=message.author;}
  447. if(user2.bot == true) {message.reply('πŸ”• You cant with bots.');return;}
  448.  
  449. const posrep = client.emojis.find(emoji => emoji.name === "posrep");
  450. const negrep = client.emojis.find(emoji => emoji.name === "negrep");
  451.  
  452. if (!tickets[user2.id]) tickets[user2.id] = {currenttickets:5,pack:0,grep:0,brep:0,rep:0,rareitem:0};
  453. let userData = tickets[user2.id];
  454.  
  455. var repval= (userData.grep - userData.brep)
  456.  
  457. if (userData.grep >= userData.brep){var emo = posrep;}else{var emo = negrep}
  458.  
  459. let embed = new Discord.RichEmbed()
  460. .setTitle(`${user2.username} SocializeMe Tickets: ${tick} **${userData.currenttickets}**\n\n${user2.username} Commands Pack: πŸ’Ÿ **${userData.pack}**\n\n${user2.username} Reputation Pack: ⭐ **${userData.rep}**\n\n${user2.username} Reputation: ${emo} **${repval}**\n\n${user2.username} Rare Items: πŸ‘‘ **${userData.rareitem}**`)
  461. .setColor("#55FFFF")
  462. message.channel.send({embed})
  463.  
  464. };
  465.  
  466.  
  467.  
  468.  
  469.  
  470. //jackpot
  471. if (message.content == '!jackp') {
  472.  
  473. if (jckpotused.has(message.author.id)) {message.reply ("⚠️ Wait 1 minute. The !jackp command is on cooldown. ⚠️");return;}
  474.  
  475.  
  476. if (!tickets[message.author.id]) tickets[message.author.id] = {currenttickets:5,pack:0,grep:0,brep:0,rep:0,rareitem:0};
  477. let userData = tickets[message.author.id];
  478. const tick = client.emojis.find(emoji => emoji.name === "ticket");
  479. jckpotused.add(message.author.id);
  480.  
  481. var em1 = ["πŸ€","πŸ’","πŸ’Ž"]
  482. var first = em1[Math.floor(Math.random() * em1.length)];
  483. var second = em1[Math.floor(Math.random() * em1.length)];
  484. var third = em1[Math.floor(Math.random() * em1.length)];
  485.  
  486.  
  487. if(third == second && third == first) {
  488.  
  489. userData.currenttickets = (parseInt (userData.currenttickets) + parseInt (10));
  490. fs.writeFile("/app/tickets.json", JSON.stringify(tickets), (err) => {if (err) console.error(err)});
  491.  
  492. let embed = new Discord.RichEmbed()
  493. .setTitle(`| ${first} | ${second} | ${third} |\n\nπŸŽ‰!!!JACKPOT!!!πŸŽ‰ \nYou Won ${tick} 10 SocializeMe Tickets.`)
  494. .setDescription(`${message.author.username} ${tick} SocializeMe Tickets: **${userData.currenttickets}**`)
  495. .setColor("#55FFFF")
  496. message.channel.send({embed})
  497.  
  498. }else{
  499. let embed = new Discord.RichEmbed()
  500. .setTitle(`| ${first} | ${second} | ${third} |`)
  501. .setColor("#55FFFF")
  502. message.channel.send({embed})
  503. }
  504.  
  505. setTimeout(() => {
  506. jckpotused.delete(message.author.id);
  507. }, 60000);
  508.  
  509. }
  510.  
  511.  
  512.  
  513. //crate
  514. if (message.content == '!crate') {
  515.  
  516. if (crateused.has(message.author.id)) {message.reply ("⚠️ Wait 1 hour. The !crate command is on cooldown. ⚠️");return;}
  517.  
  518. crateused.add(message.author.id);
  519. setTimeout(() => {
  520. crateused.delete(message.author.id);
  521. }, 3600000);
  522.  
  523.  
  524.  
  525. if(craterunning){message.reply("There is another !crate command in progress!β›”");return;}
  526. craterunning = true;
  527.  
  528. var rand_resultickets = [Math.floor(Math.random(2) * 25)]
  529. var crate = ['πŸ”΄','πŸ”΅','⚫','βšͺ'];
  530.  
  531. var randcrate = crate[Math.floor(Math.random() * crate.length)];
  532. const tick = client.emojis.find(emoji => emoji.name === "ticket");
  533.  
  534. let embed = new Discord.RichEmbed()
  535. .setTitle(`React to open the crate and win lots of ${tick} SocializeMe Tickets.`)
  536. .setImage("http://www.canalgif.net/Gifs-animados/Dinero/Cofres/Imagen-animada-Cofre-19.gif")
  537. .setColor("#55FFFF")
  538.  
  539. message.channel.send({embed: embed}).then(embedMessage => {
  540.  
  541. embedMessage.react("πŸ”΄")
  542. .then(() => embedMessage.react("πŸ”΅"))
  543. .then(() => embedMessage.react("⚫"))
  544. .then(() => embedMessage.react("βšͺ"))
  545.  
  546. .catch(() => console.error('One of the emojis failed to react.'));
  547.  
  548. const collector = embedMessage.createReactionCollector((reaction, user) =>user.id != "633719438398586880" && (reaction.emoji.name === randcrate || reaction.emoji.name != randcrate)).once("collect", reaction => {
  549. const chosen = reaction.emoji.name;
  550.  
  551. if(chosen === randcrate){
  552. if (!tickets[reaction.users.last().id]) tickets[reaction.users.last().id] = {currenttickets:5,pack:0,grep:0,brep:0,rep:0,rareitem:0};
  553. let userData = tickets[reaction.users.last().id];
  554.  
  555. userData.currenttickets = (parseInt (userData.currenttickets) + parseInt (rand_resultickets));
  556. fs.writeFile("/app/tickets.json", JSON.stringify(tickets), (err) => {if (err) console.error(err)});
  557.  
  558. let embed = new Discord.RichEmbed()
  559. .setColor(0x00AE86)
  560. .setTitle(`Nice ${reaction.users.last().username} you opened the crate and won ${rand_resultickets} ${tick} SocializeMe Tickets`)
  561. message.channel.send({embed});
  562. craterunning = false;
  563. }
  564.  
  565. if(chosen != randcrate){
  566. let embed = new Discord.RichEmbed()
  567. .setColor(0x00AE86)
  568. .setTitle(`NOO!! ${reaction.users.last().username} you failed to open the crate.`)
  569. message.channel.send({embed});
  570. craterunning = false;
  571. }
  572.  
  573.  
  574.  
  575. collector.stop()});
  576. })
  577. }
  578.  
  579.  
  580. //pack
  581. if (message.content.includes ("!gift πŸ’Ÿ")) {
  582. let user2 = message.mentions.users.first();
  583.  
  584.  
  585. if (!user2) {message.reply("πŸ”•You need to @mention someone.");return;}
  586. if(user2.bot == true) {message.reply('πŸ”• You can`t gift BOTs.');return;}
  587. if(message.mentions.users.first().id === message.author.id) {message.reply("πŸ”•You cant gitf yourself.πŸ”•");return;}
  588.  
  589.  
  590. if (!message.member.roles.find("name", "πŸ’Ÿ")) {message.reply("You don’t own this item.");return;}
  591. if (message.member.guild.member(user2).roles.find("name", "πŸ’Ÿ")){message.channel.sendMessage("```This user already owns this item.```"); return;}
  592.  
  593. if (!tickets[user2.id]) tickets[user2.id] = {currenttickets:5,pack:0,grep:0,brep:0,rep:0};
  594. let user2Data = tickets[user2.id];
  595. let userData = tickets[message.author.id];
  596.  
  597.  
  598. user2Data.pack = (parseInt (user2Data.pack) + parseInt (userData.pack));
  599. userData.pack = 0;
  600. fs.writeFile("/app/tickets.json", JSON.stringify(tickets), (err) => {if (err) console.error(err)});
  601.  
  602.  
  603. message.member.removeRole(pack);
  604. message.guild.member(user2).addRole(pack)
  605.  
  606.  
  607.  
  608. let embed = new Discord.RichEmbed()
  609. .setColor(0x00AE86)
  610. .setTitle(`${message.author.username} send a πŸ’Ÿ COMMANDS PACK gift to ${user2.username}`)
  611. message.channel.send({embed});
  612. };
  613.  
  614.  
  615.  
  616.  
  617.  
  618. //knife
  619. if (message.content.includes ("!gift πŸ”ͺ")) {
  620.  
  621. let embed = new Discord.RichEmbed()
  622. .setColor(0x00AE86)
  623. .setTitle(`${message.author.username} you cannot gift πŸ”ͺ KNIFES.`)
  624. message.channel.send({embed});
  625. };
  626.  
  627.  
  628. //ring
  629. if (message.content.includes ("!gift πŸ’")) {
  630. let embed = new Discord.RichEmbed()
  631. .setColor(0x00AE86)
  632. .setTitle(`${message.author.username} You can’t gift πŸ’ Magic Rings`)
  633. message.channel.send({embed});
  634. };
  635.  
  636.  
  637.  
  638.  
  639.  
  640. //icecream
  641. if (message.content.includes ("!gift 🍨")) {
  642. let user2 = message.mentions.users.first();
  643.  
  644.  
  645. if (!user2) {message.reply("πŸ”•You need to mention @ someone.");return;}
  646. if(user2.bot == true) {message.reply('πŸ”• You can’t gift BOTs.');return;}
  647. if(message.mentions.users.first().id === message.author.id) {message.reply("πŸ”•You can’t gift yourself.πŸ”•");return;}
  648.  
  649.  
  650. if (!message.member.roles.find("name", "🍨")) {message.reply("You don’t own this item.");return;}
  651. if (message.member.guild.member(user2).roles.find("name", "🍨")){message.channel.sendMessage("```This user already owns this item```"); return;}
  652.  
  653. const posrep = client.emojis.find(emoji => emoji.name === "posrep");
  654.  
  655.  
  656. if (!tickets[message.author.id]) tickets[message.author.id] = {currenttickets:5,pack:0,grep:0,brep:0,rep:0,rareitem:0};
  657.  
  658. let userData = tickets[message.author.id];
  659. userData.grep = (parseInt (userData.grep) + parseInt (2));
  660. fs.writeFile("/app/tickets.json", JSON.stringify(tickets), (err) => {if (err) console.error(err)});
  661.  
  662.  
  663. message.member.removeRole(cream);
  664. //message.guild.member(user2).addRole(cream)
  665.  
  666.  
  667.  
  668. let embed = new Discord.RichEmbed()
  669. .setColor(0x00AE86)
  670. .setTitle(`${message.author.username} sent an 🍨 ICECREAM as a gift to ${user2.username}.\n\n +2 ${posrep} Reputation point.`)
  671. message.channel.send({embed});
  672. };
  673.  
  674.  
  675.  
  676. //tiger🐯
  677. if (message.content.includes ("!gift 🐯")) {
  678. let user2 = message.mentions.users.first();
  679.  
  680.  
  681. if (!user2) {message.reply("πŸ”•You need to @mention someone.");return;}
  682. if(user2.bot == true) {message.reply('πŸ”• You can’t gift BOTs.');return;}
  683. if(message.mentions.users.first().id === message.author.id) {message.reply("πŸ”•You can’t gift yourself.πŸ”•");return;}
  684.  
  685.  
  686. if (!message.member.roles.find("name", "🐯")) {message.reply("You don’t own this item.");return;}
  687. if (message.member.guild.member(user2).roles.find("name", "🐯")){message.channel.sendMessage("```This user already owns this item```"); return;}
  688.  
  689.  
  690. message.member.removeRole(tiger);
  691. message.guild.member(user2).addRole(tiger)
  692.  
  693.  
  694.  
  695. let embed = new Discord.RichEmbed()
  696. .setColor(0x00AE86)
  697. .setTitle(`${message.author.username} sent a 🐯 TIGER as a gift to ${user2.username}`)
  698. message.channel.send({embed});
  699. };
  700.  
  701.  
  702. //dinner 🍾
  703. if (message.content.includes ("!gift 🍾")) {
  704. let user2 = message.mentions.users.first();
  705.  
  706.  
  707. if (!user2) {message.reply("πŸ”•You need to @mention someone.");return;}
  708. if(user2.bot == true) {message.reply('πŸ”• You can’t gift BOTs.');return;}
  709. if(message.mentions.users.first().id === message.author.id) {message.reply("πŸ”•You can’t gift yourself.πŸ”•");return;}
  710.  
  711.  
  712. if (!message.member.roles.find("name", "🍾")) {message.reply("You don’t own this item.");return;}
  713. if (message.member.guild.member(user2).roles.find("name", "🍾")){message.channel.sendMessage("```This user already owns this item```"); return;}
  714.  
  715. const posrep = client.emojis.find(emoji => emoji.name === "posrep");
  716.  
  717.  
  718. if (!tickets[message.author.id]) tickets[message.author.id] = {currenttickets:5,pack:0,grep:0,brep:0,rep:0,rareitem:0};
  719.  
  720. let userData = tickets[message.author.id];
  721. userData.grep = (parseInt (userData.grep) + parseInt (5));
  722. fs.writeFile("/app/tickets.json", JSON.stringify(tickets), (err) => {if (err) console.error(err)});
  723.  
  724. message.member.removeRole(dinner);
  725.  
  726.  
  727.  
  728.  
  729. let embed = new Discord.RichEmbed()
  730. .setColor(0x00AE86)
  731. .setTitle(`${message.author.username} Invited ${user2.username} to a 🍾 ROMANTIC DINNER.\n\n +5 ${posrep} Reputation point.`)
  732. message.channel.send({embed});
  733. };
  734.  
  735.  
  736.  
  737.  
  738.  
  739.  
  740.  
  741. //COMMANDS
  742.  
  743. if (message.content == "!falsify") {
  744.  
  745. if (!message.member.roles.find("name", "πŸ’")) {message.reply("You need a Magic Ring to create tickets.");return;}
  746.  
  747. if (falsifyused.has(message.author.id)) {message.reply ("⚠️ Wait 2 minutes. The !falsify command is on cooldown. ⚠️");return;}
  748.  
  749. falsifyused.add(message.author.id);
  750. setTimeout(() => {
  751. falsifyused.delete(message.author.id);
  752. }, 120000);
  753.  
  754.  
  755.  
  756.  
  757. let userData = tickets[message.author.id];
  758.  
  759. var rand_steal = [Math.floor(Math.random(1) * 100)]
  760. const tick = client.emojis.find(emoji => emoji.name === "ticket");
  761. const negrep = client.emojis.find(emoji => emoji.name === "negrep");
  762.  
  763. if(rand_steal >=50) {
  764. let embed = new Discord.RichEmbed()
  765. .setColor(0x00AE86)
  766. .setTitle(`${message.author.username} You failed falsifying ${tick} SocializeMe Tickets. You also earned -1 ${negrep} Reputation points.`)
  767. message.channel.send({embed});
  768. userData.brep= (parseInt (userData.brep) + parseInt (1));
  769. fs.writeFile("/app/tickets.json", JSON.stringify(tickets), (err) => {if (err) console.error(err)});
  770. return;
  771. }
  772.  
  773.  
  774.  
  775.  
  776. let embed = new Discord.RichEmbed()
  777. .setColor(0x00AE86)
  778. .setTitle(`${message.author.username} You successfully falsified 2 ${tick} SocializeMe Tickets. You also earned -1 ${negrep} Reputation point`)
  779. message.channel.send({embed});
  780.  
  781. userData.currenttickets = (parseInt (userData.currenttickets) + parseInt (2));
  782. userData.brep= (parseInt (userData.brep) + parseInt (1));
  783. fs.writeFile("/app/tickets.json", JSON.stringify(tickets), (err) => {if (err) console.error(err)});
  784. };
  785.  
  786.  
  787. //send tickets
  788. if (message.content.includes("!tickets")) {
  789.  
  790. const user2 = message.mentions.users.first();
  791. const amount = !!parseInt(message.content.split(' ')[1]) ? parseInt(message.content.split(' ')[1]) : parseInt(message.content.split(' ')[2])
  792. if (!amount) return message.reply('An amount of tickets to gift must be specified!');
  793. if (!amount && !user2) return message.reply('A user and an amount of tickets must be specified ');
  794.  
  795. if(user2.bot == true) {message.reply('πŸ”• You can’t gift tickets to BOTs.');return;}
  796. if(message.mentions.users.first().id === message.author.id) {message.reply("πŸ”•You can’t gift tickets to yourself.πŸ”•");return;}
  797.  
  798.  
  799. if (!tickets[user2.id]) tickets[user2.id] = {currenttickets:0,pack:0,grep:0,brep:0,rep:0,rareitem:0};
  800. let user2Data = tickets[user2.id];
  801. let userData = tickets[message.author.id];
  802.  
  803. if(userData.currenttickets ==0) {message.reply("You don’t have tickets to gift.")}
  804.  
  805. const tick = client.emojis.find(emoji => emoji.name === "ticket");
  806.  
  807. user2Data.currenttickets = (parseInt (user2Data.currenttickets) + parseInt (amount));
  808. userData.currenttickets = (parseInt (userData.currenttickets) - parseInt (amount));
  809. fs.writeFile("/app/tickets.json", JSON.stringify(tickets), (err) => {if (err) console.error(err)});
  810.  
  811. let embed = new Discord.RichEmbed()
  812. .setColor(0x00AE86)
  813. .setTitle(`${message.author.username} sent ${tick} ${amount} SocializeMe Tickets to ${user2.username}`)
  814. message.channel.send({embed});
  815.  
  816. };
  817.  
  818.  
  819.  
  820. //give +rep
  821. if (message.content.includes("+rep")) {
  822. if(! message.member.roles.find("name", "⭐")) { message.reply("Sorry!. You don’t have ⭐ any Reputation Points. Type !shop to buy some in the Shop.");return;}
  823. let user = message.mentions.users.first();
  824. if (!user) {message.reply ("πŸ”•You need to @mention someone.");return;}
  825. if(user.bot == true) {message.reply ('πŸ”• You can’t give reputation point to a BOT.');return;}
  826. if(message.mentions.users.first().id === message.author.id) {message.reply ("πŸ”•You can’t give reputation to yourself.πŸ”•");return;}
  827.  
  828. if (!tickets[user.id]) tickets[user.id] = {currenttickets:5,pack:0,grep:0,brep:0,rep:0,rareitem:0};
  829.  
  830. let userData = tickets[message.author.id];
  831. let user2Data = tickets[user.id];
  832.  
  833. const posrep = client.emojis.find(emoji => emoji.name === "posrep");
  834.  
  835.  
  836. userData.rep = (parseInt (userData.rep) - parseInt (1));
  837. user2Data.grep= (parseInt (user2Data.grep) + parseInt (1));
  838. if(userData.rep ==0) {message.member.removeRole(rep);}
  839. fs.writeFile("/app/tickets.json", JSON.stringify(tickets), (err) => {if (err) console.error(err)});
  840.  
  841. let embed = new Discord.RichEmbed()
  842. .setColor(0x00AE86)
  843. .setTitle(`${message.author.username.toUpperCase()} gave to ${user.username.toUpperCase()} +1 ${posrep} Reputation points.`)
  844. message.channel.send({embed});
  845. };
  846.  
  847.  
  848. //give -rep
  849. if (message.content.includes("-rep")) {
  850. if(! message.member.roles.find("name", "⭐")) { message.reply("Sorry!. You don’t have any ⭐ Reputation Points. Type !shop to buy some in the Shop.");return;}
  851. let user = message.mentions.users.first();
  852. if (!user) {message.reply ("πŸ”•You need to @mention someone.");return;}
  853. if(user.bot == true) {message.reply ('πŸ”• You can’t give reputation to a BOT.');return;}
  854. if(message.mentions.users.first().id === message.author.id) {message.reply ("πŸ”•You can’t give reputation to yourself.πŸ”•");return;}
  855.  
  856. if (!tickets[user.id]) tickets[user.id] = {currenttickets:5,pack:0,grep:0,brep:0,rep:0,rareitem:0};
  857.  
  858. let userData = tickets[message.author.id];
  859. let user2Data = tickets[user.id];
  860.  
  861.  
  862. const negrep = client.emojis.find(emoji => emoji.name === "negrep");
  863.  
  864. userData.rep = (parseInt (userData.rep) - parseInt (1));
  865. user2Data.brep= (parseInt (user2Data.brep) + parseInt (1));
  866. if(userData.rep ==0) {message.member.removeRole(rep);}
  867. fs.writeFile("/app/tickets.json", JSON.stringify(tickets), (err) => {if (err) console.error(err)});
  868.  
  869. let embed = new Discord.RichEmbed()
  870. .setColor(0x00AE86)
  871. .setTitle(`${message.author.username.toUpperCase()} gave to ${user.username.toUpperCase()} -1 ${negrep} Reputation points.`)
  872. message.channel.send({embed});
  873. };
  874.  
  875.  
  876.  
  877.  
  878.  
  879. //steal
  880. if (message.content.includes ("!steal")) {
  881.  
  882. if(message.author.bot){return;}
  883.  
  884. if (thiefused.has(message.author.id)) {message.reply ("⚠️ Wait 2 minutes. The !steal command is on cooldown. ⚠️");return;}
  885.  
  886. let user2 = message.mentions.users.first();
  887.  
  888.  
  889. if (!user2) {message.reply("πŸ”•You need to @mention someone to steal.");return;}
  890. if(user2.bot == true) {message.reply('πŸ”• You can’t steal from BOTs.');return;}
  891. if(message.mentions.users.first().id === message.author.id) {message.reply("πŸ”•You can’t steal yourself.πŸ”•");return;}
  892.  
  893.  
  894. if (!message.member.roles.find("name", "πŸ”ͺ")) {message.reply("You need a knife to steal tickets from someone.");return;}
  895.  
  896.  
  897. if (!tickets[user2.id]) {message.reply("This user doesn’t have any tickets.");return;}
  898. let user2Data = tickets[user2.id];
  899. let userData = tickets[message.author.id];
  900.  
  901. if(user2Data.currenttickets ==0) {message.reply("This user doesn’t have any tickets.");return;}
  902.  
  903.  
  904. thiefused.add(message.author.id);
  905. setTimeout(() => {
  906. thiefused.delete(message.author.id);
  907. }, 120000);
  908.  
  909.  
  910.  
  911. var rand_steal = [Math.floor(Math.random(1) * 100)]
  912. if (message.member.guild.member(user2).roles.find("name", "🐯")){var failtiger = 10;}else{var failtiger = 70;}
  913.  
  914.  
  915. const negrep = client.emojis.find(emoji => emoji.name === "negrep");
  916. const tick = client.emojis.find(emoji => emoji.name === "ticket");
  917.  
  918. if(rand_steal >=failtiger) {
  919. let embed = new Discord.RichEmbed()
  920. .setColor(0x00AE86)
  921. .setTitle(`${message.author.username} You failed stealing ${tick} SocializeMe Tickets from ${user2.username}. You also earned -1 ${negrep} Reputation points.`)
  922. message.channel.send({embed});
  923. userData.brep= (parseInt (userData.brep) + parseInt (1));
  924. fs.writeFile("/app/tickets.json", JSON.stringify(tickets), (err) => {if (err) console.error(err)});
  925. return;
  926. }
  927.  
  928.  
  929. let embed = new Discord.RichEmbed()
  930. .setColor(0x00AE86)
  931. .setTitle(`${message.author.username} You have stolen ${user2.username} ${tick} ${user2Data.currenttickets} SocializeMe Tickets. You also earned ${negrep} Reputation point`)
  932. message.channel.send({embed});
  933.  
  934. userData.currenttickets = (parseInt (user2Data.currenttickets) + parseInt (userData.currenttickets));
  935. user2Data.currenttickets = 0;
  936. userData.brep= (parseInt (userData.brep) + parseInt (1));
  937. fs.writeFile("/app/tickets.json", JSON.stringify(tickets), (err) => {if (err) console.error(err)});
  938. };
  939.  
  940.  
  941.  
  942. //pat
  943. if (message.content.includes ("!pat")) {
  944. if(! message.member.roles.find("name", "πŸ’Ÿ")) { message.reply("Sorry!. You don’t have any πŸ’Ÿ Command Packs. Type !shop to buy some from the Shop.");return;}
  945.  
  946.  
  947. let user2 = message.mentions.users.first();
  948. //returns
  949. if (!user2) {message.reply("πŸ”•You need to mention @ someone.");return;}
  950. if(user2.bot == true) {message.reply('πŸ”• You can’t pat BOTs.');return;}
  951. if(message.mentions.users.first().id === message.author.id) {message.reply("πŸ”•You can’t pat yourself.πŸ”•");return;}
  952.  
  953. let userData = tickets[message.author.id];
  954. userData.pack = (parseInt (userData.pack) - parseInt (1));
  955. if(userData.pack ==0) {message.member.removeRole(pack);}
  956. fs.writeFile("/app/tickets.json", JSON.stringify(tickets), (err) => {if (err) console.error(err)});
  957.  
  958. var pats = [
  959. "https://gifimage.net/wp-content/uploads/2017/09/anime-head-pat-gif-5.gif",
  960. "https://media.tenor.com/images/2ad34a5a1c2bed7bad048b9267ae5ab4/tenor.gif",
  961. "https://media.tenor.com/images/fcff52c5ce953eaffb54bcbbbbcc5d61/tenor.gif",
  962. "https://media1.tenor.com/images/63341474f552488b507a3f2a3f27acec/tenor.gif",
  963. "https://media.tenor.com/images/d4a87cc9b7ae6c81e202e43a6ab271d1/tenor.gif"
  964. ]
  965. var randompats = pats[Math.floor(Math.random() * pats.length)];
  966.  
  967. let embed = new Discord.RichEmbed()
  968. .setAuthor("PATS! 😊")
  969. .setColor(0x00AE86)
  970. .setTitle(`**${user2.username.toUpperCase()}**You were patted by **${message.author.username.toUpperCase()}**`)
  971. .setImage(randompats)
  972. message.channel.send({embed});
  973. };
  974.  
  975.  
  976. //pregnant
  977. if (message.content.includes("!pregnant")) {
  978. if(! message.member.roles.find("name", "πŸ’Ÿ")) { message.reply("Sorry!. You don’t have any πŸ’Ÿ Command Packs. Type !shop to buy them from the Shop.");return;}
  979.  
  980.  
  981. let user = message.mentions.users.first();
  982. if (!user) {message.reply ("πŸ”•You need to mention @ someone.");return;}
  983. if(user.bot == true) {message.reply ('πŸ”• You cannot pregnant a bot.');return;}
  984. if(message.mentions.users.first().id === message.author.id) {message.reply ("πŸ”•You cant pregnant yourself.πŸ”•");return;}
  985.  
  986.  
  987. if (!pregnant[user.username]) pregnant[user.username] = {babys:0};
  988.  
  989. message.delete(1000);
  990.  
  991. let PuserData = pregnant[user.username];
  992. let userData = tickets[message.author.id];
  993.  
  994. userData.pack = (parseInt (userData.pack) - parseInt (1));
  995. if(userData.pack ==0) {message.member.removeRole(pack);}
  996. fs.writeFile("/app/tickets.json", JSON.stringify(tickets), (err) => {if (err) console.error(err)});
  997. PuserData.babys = (parseInt (PuserData.babys) + parseInt (1));
  998. fs.writeFile("/app/pregnant.json", JSON.stringify(pregnant), (err) => {if (err) console.error(err)});
  999.  
  1000.  
  1001. var preg = [
  1002. "https://i.imgur.com/Y1KDmaJ.gif",
  1003. "https://media2.giphy.com/media/v1qCOXAevt2G4/giphy.gif",
  1004. "http://flipanim.com/gifs/rV6HSVMg.gif",
  1005. "https://i.pinimg.com/originals/53/9d/7a/539d7a1be209330b999020840bb9451d.gif",
  1006. "https://media1.tenor.com/images/e632e0fbe053c4f9f0ea319e29f8044c/tenor.gif"
  1007. ]
  1008. var randompreg = preg[Math.floor(Math.random() * preg.length)];
  1009.  
  1010.  
  1011. let embed = new Discord.RichEmbed()
  1012. .setColor(0x00AE86)
  1013. .setTitle(`🀰 ${user.username} You have a BABY ON BOARD πŸ€—.`)
  1014. .setDescription(`${user.username} babies: **${PuserData.babys}**`)
  1015. .setImage(randompreg)
  1016. .setFooter("Type !pregnant to use it.")
  1017. message.channel.send({embed});
  1018. };
  1019.  
  1020.  
  1021. //shoot
  1022. if (message.content.includes ("!shoot")) {
  1023. if(! message.member.roles.find("name", "πŸ’Ÿ")) { message.reply("Sorry!. You don’t have any πŸ’Ÿ Command Packs. Type !shop to buy them from the Shop.");return;}
  1024.  
  1025. let user2 = message.mentions.users.first();
  1026. if (!user2) {user2 = message.author;}
  1027.  
  1028. let userData = tickets[message.author.id];
  1029. userData.pack = (parseInt (userData.pack) - parseInt (1));
  1030. if(userData.pack ==0) {message.member.removeRole(pack);}
  1031. fs.writeFile("/app/tickets.json", JSON.stringify(tickets), (err) => {if (err) console.error(err)});
  1032.  
  1033.  
  1034. if ( (user2 == message.author) || (message.mentions.users.first().id === message.author.id)) {
  1035. let embed = new Discord.RichEmbed()
  1036. .setTitle(`**${message.author.username}** has shot himself. BANG!`)
  1037. .setColor(0x00AE86)
  1038. .setImage("https://media.tenor.com/images/69efbd65d3e9469a2187c4e325d36bc8/tenor.gif")
  1039. message.channel.send({embed});
  1040.  
  1041. }else{
  1042. var shoot = [
  1043. "https://media1.giphy.com/media/vlxoP09DNc8QU/giphy.gif",
  1044. "https://media1.tenor.com/images/e9c914be61acb8f2033f2327605c5562/tenor.gif",
  1045. "https://media.tenor.com/images/bc493788b867de6f4d64d5742d319ce8/tenor.gif",
  1046. "https://thumbs.gfycat.com/DisguisedSimpleAmmonite-small.gif",
  1047. "https://media.tenor.com/images/69efbd65d3e9469a2187c4e325d36bc8/tenor.gif"
  1048. ]
  1049. var randomshoot = shoot[Math.floor(Math.random() * shoot.length)];
  1050.  
  1051.  
  1052. let embed = new Discord.RichEmbed()
  1053. .setTitle(`**${message.author.username}** shoots on **${user2.username}** BANG!`)
  1054. .setColor(0x00AE86)
  1055. .setImage(randomshoot)
  1056. message.channel.send({embed});
  1057.  
  1058. }
  1059. };
  1060.  
  1061.  
  1062. //basement
  1063. if (message.content.includes("!base")) {
  1064. if(! message.member.roles.find("name", "πŸ’Ÿ")) { message.reply("Sorry!. You don’t have any πŸ’Ÿ Command Packs. Type !shop to buy them from the Shop.");return;}
  1065.  
  1066.  
  1067. let user = message.mentions.users.first();
  1068. if (!user) {message.reply ("πŸ”•You need to mention @ someone.");return;}
  1069. if(user.bot == true) {message.reply ('πŸ”• You cannot invite a bot.');return;}
  1070.  
  1071. let userData = tickets[message.author.id];
  1072. userData.pack = (parseInt (userData.pack) - parseInt (1));
  1073. if(userData.pack ==0) {message.member.removeRole(pack);}
  1074. fs.writeFile("/app/tickets.json", JSON.stringify(tickets), (err) => {if (err) console.error(err)});
  1075.  
  1076.  
  1077.  
  1078.  
  1079. let embed = new Discord.RichEmbed()
  1080. .setColor(0x00AE86)
  1081. .setDescription(`***${user.username}***. ***${message.author.username}*** invites you to go down to the basement 😱. Do you want to go?.`)
  1082. .setImage("https://media.tenor.com/images/68048762da94c1158f05f3326f6c9297/tenor.gif")
  1083. message.channel.send({embed});
  1084.  
  1085. }
  1086.  
  1087.  
  1088. //insult
  1089. if (message.content.includes ("!insult")) {
  1090. if(! message.member.roles.find("name", "πŸ’Ÿ")) { message.reply("Sorry!. You don’t have any πŸ’Ÿ Command Packs. Type !shop to buy them from the Shop.");return;}
  1091.  
  1092. let user2 = message.mentions.users.first();
  1093. //returns
  1094. if (!user2) {message.reply("πŸ”•You need to mention @ someone.");return;}
  1095. if(user2.bot == true) {message.reply('πŸ”• You cant insult bots.');return;}
  1096. if(message.mentions.users.first().id === message.author.id) {message.reply("πŸ”•You cant insult yourself.πŸ”•");return;}
  1097. message.delete(1000);
  1098.  
  1099. let userData = tickets[message.author.id];
  1100. userData.pack = (parseInt (userData.pack) - parseInt (1));
  1101. if(userData.pack ==0) {message.member.removeRole(pack);}
  1102. fs.writeFile("/app/tickets.json", JSON.stringify(tickets), (err) => {if (err) console.error(err)});
  1103.  
  1104.  
  1105.  
  1106. let embed = new Discord.RichEmbed()
  1107. .setAuthor("INSULT! 🀬")
  1108. .setColor(0x00AE86)
  1109. .setDescription(`**${user2.username}** You little piece of ||@#!!%%34!@||....`)
  1110. .setFooter("Type !insult to use it.")
  1111. .setImage("https://media1.tenor.com/images/3c54208e17097ceee6ca8b9e5f983851/tenor.gif")
  1112. message.channel.send({embed});
  1113. };
  1114.  
  1115.  
  1116.  
  1117. //lick
  1118. if (message.content.includes ("!lick")) {
  1119. if(! message.member.roles.find("name", "πŸ’Ÿ")) { message.reply("Sorry!. You don’t have any πŸ’Ÿ Command Packs. Type !shop to buy them from the Shop.");return;}
  1120.  
  1121. let user2 = message.mentions.users.first();
  1122. //returns
  1123. if (!user2) {message.reply("πŸ”•You need to @mention someone.");return;}
  1124. if(user2.bot == true) {message.reply('πŸ”• You can’t lick a BOT.');return;}
  1125. if(message.mentions.users.first().id === message.author.id) {message.reply("πŸ”•You can’t lick yourself.πŸ”•");return;}
  1126.  
  1127. let userData = tickets[message.author.id];
  1128. userData.pack = (parseInt (userData.pack) - parseInt (1));
  1129. if(userData.pack ==0) {message.member.removeRole(pack);}
  1130. fs.writeFile("/app/tickets.json", JSON.stringify(tickets), (err) => {if (err) console.error(err)});
  1131.  
  1132. var licks = [
  1133. "https://media2.giphy.com/media/d3MKjBSe5zVJ3BLO/giphy.gif",
  1134. "https://media0.giphy.com/media/l3mZd0YH1I6KRPJ3q/giphy.gif",
  1135. "https://i.pinimg.com/originals/ab/54/55/ab545569ce61eac6fe264e81f68d0711.gif",
  1136. "https://media1.tenor.com/images/efd46743771a78e493e66b5d26cd2af1/tenor.gif",
  1137. "https://media3.giphy.com/media/DCAEtqmTVV8CquN3rY/giphy.gif"
  1138. ]
  1139. var randomlicks = licks[Math.floor(Math.random() * licks.length)];
  1140.  
  1141. let embed = new Discord.RichEmbed()
  1142. .setAuthor("LICK πŸ‘…")
  1143. .setColor(0x00AE86)
  1144. .setDescription(`**${message.author.username}** has licked **${user2.username}**`)
  1145. .setImage(randomlicks)
  1146. message.channel.send({embed});
  1147. };
  1148.  
  1149.  
  1150.  
  1151.  
  1152.  
  1153. //hug
  1154. if (message.content.includes("!hug")) {
  1155. if(! message.member.roles.find("name", "πŸ’Ÿ")) { message.reply("Sorry! You don’t have any πŸ’Ÿ Command Packs. Type !shop to buy some from the Shop.");return;}
  1156. if(in_process2){message.reply("Thers another hug in process!");return;}
  1157. let user2 = message.mentions.users.first();
  1158. if (!user2) {message.reply ("πŸ”•You need to mention @ someone.");return;}
  1159. if(user2.bot == true) {message.reply ('πŸ”• You can’t hug a bot.');return;}
  1160. if(message.mentions.users.first().id === message.author.id) {message.reply ("πŸ”•You can’t hug yourself.πŸ”•");return;}
  1161.  
  1162. let userData = tickets[message.author.id];
  1163. userData.pack = (parseInt (userData.pack) - parseInt (1));
  1164. if(userData.pack ==0) {message.member.removeRole(pack);}
  1165. fs.writeFile("/app/tickets.json", JSON.stringify(tickets), (err) => {if (err) console.error(err)});
  1166.  
  1167.  
  1168. in_process2 = true;
  1169.  
  1170. let embed = new Discord.RichEmbed()
  1171. .setColor(0x00AE86)
  1172. .setTitle(`${message.author.username} wants to hug you ${user2.username} ...πŸ™„ react with one of the emojis below.`)
  1173. message.channel.send({embed: embed}).then(embedMessage => {
  1174.  
  1175. embedMessage.react("πŸ‘")
  1176. .then(() => embedMessage.react("πŸ‘Ž"))
  1177. .then(() => embedMessage.react("πŸ‘Š"))
  1178. .catch(() => console.error('One of the emojis failed to react.'));
  1179.  
  1180.  
  1181. const filter = (reaction, user) => {
  1182. return ['πŸ‘', 'πŸ‘Ž','πŸ‘Š'].includes(reaction.emoji.name) && user.id === user2.id;
  1183. };
  1184.  
  1185. embedMessage.awaitReactions(filter, { max: 1, time: 15000, errors: ['time'] })
  1186. .then(collected => {
  1187. const reaction = collected.first();
  1188.  
  1189. if (reaction.emoji.name === 'πŸ‘') {
  1190. var hugs = [
  1191. "https://i.imgur.com/VgP2ONn.gif",
  1192. "https://i.pinimg.com/originals/b1/18/9e/b1189e353db0bed3521885bec284264b.gif",
  1193. "https://media1.tenor.com/images/62a6c2e1399364bfb280a08232c4c0ad/tenor.gif",
  1194. "https://i.pinimg.com/originals/42/99/78/4299787942726aa1a232a81c8a3f226b.gif",
  1195. "https://media.tenor.com/images/708276a6666cbe55f9583b8c1dcdc67b/tenor.gif"
  1196. ]
  1197. var randomhugs = hugs[Math.floor(Math.random() * hugs.length)];
  1198.  
  1199. let embed = new Discord.RichEmbed()
  1200. .setColor(0x00AE86)
  1201. .setTitle("❣️❣️❣️WHAT A NICE HUG❣️❣️❣️")
  1202. .setImage(randomhugs)
  1203. message.channel.send({embed});
  1204. in_process2 = false;
  1205. }
  1206.  
  1207. if (reaction.emoji.name === 'πŸ‘Š') {
  1208. let embed = new Discord.RichEmbed()
  1209. .setColor(0x00AE86)
  1210. .setTitle(`**${user2.username}** πŸ‘Š punches you. He/she doesn't want your hug.`)
  1211. .setImage("http://giphygifs.s3.amazonaws.com/media/P4l2ET85UuedO/giphy.gif")
  1212. message.channel.send({embed});
  1213. in_process2 = false;
  1214. }
  1215.  
  1216. if (reaction.emoji.name === 'πŸ‘Ž') {
  1217. let embed = new Discord.RichEmbed()
  1218. .setColor(0x00AE86)
  1219. .setTitle(`**${user2.username}** 🀬doesn't want your hug...`)
  1220. .setImage("https://media.giphy.com/media/AT2OTjFge4JnW/giphy.gif")
  1221. message.channel.send({embed});
  1222. in_process2 = false;
  1223. }
  1224.  
  1225. })
  1226. .catch(collected => {embedMessage.delete();message.channel.send(`**${user2.username}** has not responded. It seems he/she doesn't want your hug.πŸ’”`);in_process2 = false;return;})
  1227.  
  1228.  
  1229. });
  1230.  
  1231. };
  1232.  
  1233. //sex
  1234. if (message.content.includes("!sex")) {
  1235. if(! message.member.roles.find("name", "πŸ’Ÿ")) { message.reply("Sorry!. You dont have πŸ’Ÿ Commands Pack.Type !shop to Buy them in the Shop.");return;}
  1236. if(in_process2){message.reply("Thers another command in process!");return;}
  1237. let user2 = message.mentions.users.first();
  1238. if (!user2) {message.reply ("πŸ”•You need to mention @ someone.");return;}
  1239. if(user2.bot == true) {message.reply ('πŸ”• You cannot do it with a bot.');return;}
  1240. if(message.mentions.users.first().id === message.author.id) {message.reply ("πŸ”•You can, but really not with yourself.πŸ”•");return;}
  1241.  
  1242. let userData = tickets[message.author.id];
  1243. userData.pack = (parseInt (userData.pack) - parseInt (1));
  1244. if(userData.pack ==0) {message.member.removeRole(pack);}
  1245. fs.writeFile("/app/tickets.json", JSON.stringify(tickets), (err) => {if (err) console.error(err)});
  1246.  
  1247.  
  1248. in_process2 = true;
  1249.  
  1250. let embed = new Discord.RichEmbed()
  1251. .setColor(0x00AE86)
  1252. .setTitle(`${message.author.username} Wants to "make babys with you ${user2.username} ...πŸ™„ react below.`)
  1253. message.channel.send({embed: embed}).then(embedMessage => {
  1254.  
  1255. embedMessage.react("πŸ‘")
  1256. .then(() => embedMessage.react("πŸ‘Ž"))
  1257. .then(() => embedMessage.react("πŸ‘Š"))
  1258. .catch(() => console.error('One of the emojis failed to react.'));
  1259.  
  1260.  
  1261. const filter = (reaction, user) => {
  1262. return ['πŸ‘', 'πŸ‘Ž','πŸ‘Š'].includes(reaction.emoji.name) && user.id === user2.id;
  1263. };
  1264.  
  1265. embedMessage.awaitReactions(filter, { max: 1, time: 15000, errors: ['time'] })
  1266. .then(collected => {
  1267. const reaction = collected.first();
  1268.  
  1269. if (reaction.emoji.name === 'πŸ‘') {
  1270. var sex = [
  1271. "https://thumbs.gfycat.com/CluelessTintedKoala-size_restricted.gif",
  1272. "https://media1.tenor.com/images/d2b00918b2b6659915b79086d77087b9/tenor.gif",
  1273. "https://media.giphy.com/media/9x1oYUXFD1AUB7eCkf/giphy.gif"
  1274. ]
  1275. var randomsex = sex[Math.floor(Math.random() * sex.length)];
  1276.  
  1277. let embed = new Discord.RichEmbed()
  1278. .setColor(0x00AE86)
  1279. .setTitle("❣️❣️❣️ OH GOD THOSE TWO...❣️❣️❣️")
  1280. .setImage(randomsex)
  1281. message.channel.send({embed});
  1282. in_process2 = false;
  1283. }
  1284.  
  1285. if (reaction.emoji.name === 'πŸ‘Š') {
  1286. let embed = new Discord.RichEmbed()
  1287. .setColor(0x00AE86)
  1288. .setTitle(`**${user2.username}** πŸ‘Š has hit you. Doesn't want make babys..`)
  1289. .setImage("https://media.tenor.com/images/8a26afa7f1c0e607c283c559a333d453/tenor.gif")
  1290. message.channel.send({embed});
  1291. in_process2 = false;
  1292. }
  1293.  
  1294. if (reaction.emoji.name === 'πŸ‘Ž') {
  1295. let embed = new Discord.RichEmbed()
  1296. .setColor(0x00AE86)
  1297. .setTitle(`**${user2.username}** 🀬Doesn't want make babys...`)
  1298. .setImage("https://media1.tenor.com/images/13f08a96bd6a1d7ce360ec5facd0952c/tenor.gif")
  1299. message.channel.send({embed});
  1300. in_process2 = false;
  1301. }
  1302.  
  1303. })
  1304. .catch(collected => {embedMessage.delete();message.channel.send(`**${user2.username}** has not responded. I guess he|she doesn't want make babys.πŸ’”`);in_process2 = false;return;})
  1305.  
  1306.  
  1307. });
  1308.  
  1309. };
  1310.  
  1311.  
  1312.  
  1313.  
  1314. //kiss
  1315. if (message.content.includes("!kiss")) {
  1316. if(! message.member.roles.find("name", "πŸ’Ÿ")) { message.reply("Sorry!. You don’t have any πŸ’Ÿ Command Packs. Type !shop to buy some from the Shop.");return;}
  1317. let user = message.mentions.users.first();
  1318. if (!user) {message.reply ("πŸ”•You need to @mention someone.");return;}
  1319. if(user.bot == true) {message.reply ('πŸ”• You can’t kiss a bot.');return;}
  1320. if(message.mentions.users.first().id === message.author.id) {message.reply ("πŸ”•You can’t kiss yourself.πŸ”•");return;}
  1321.  
  1322. let userData = tickets[message.author.id];
  1323. userData.pack = (parseInt (userData.pack) - parseInt (1));
  1324. if(userData.pack ==0) {message.member.removeRole(pack);}
  1325. fs.writeFile("/app/tickets.json", JSON.stringify(tickets), (err) => {if (err) console.error(err)});
  1326.  
  1327.  
  1328. var kisses = [
  1329. "https://media1.tenor.com/images/3633e90e9bb3298311aa8f855b64b973/tenor.gif",
  1330. "https://i.pinimg.com/originals/e9/e8/c2/e9e8c27d2b8263e92997e1ff32896703.gif",
  1331. "https://media.tenor.com/images/e68c95656b5d700bb3b0dd981dad98ec/tenor.gif",
  1332. "https://media1.tenor.com/images/543f2c219342ff89d9fed74558421f2d/tenor.gif"
  1333. ]
  1334. var randomkisses = kisses[Math.floor(Math.random() * kisses.length)];
  1335.  
  1336. let embed = new Discord.RichEmbed()
  1337. .setColor(0x00AE86)
  1338. .setTitle(`**${user.username}** WAS KISSED BY **${message.author.username}**`)
  1339. .setImage(randomkisses)
  1340. message.channel.send({embed});
  1341.  
  1342. };
  1343.  
  1344.  
  1345.  
  1346.  
  1347.  
  1348. //hit
  1349.  
  1350. if (message.content.includes("!hit")) {
  1351. if(! message.member.roles.find("name", "πŸ’Ÿ")) { message.reply("Sorry!. You don’t have any πŸ’Ÿ Command Packs. Type !shop to buy some from the Shop.");return;}
  1352. let user = message.mentions.users.first();
  1353. if (!user) {message.reply ("πŸ”•You need to @mention someone.");return;}
  1354. if(user.bot == true) {message.reply ('πŸ”• You can’t hit a BOT.');return;}
  1355. if(message.mentions.users.first().id === message.author.id) {message.reply ("πŸ”•You can’t hit yourself.πŸ”•");return;}
  1356.  
  1357.  
  1358. const negrep = client.emojis.find(emoji => emoji.name === "negrep");
  1359.  
  1360. let userData = tickets[message.author.id];
  1361. userData.pack = (parseInt (userData.pack) - parseInt (1));
  1362. userData.brep= (parseInt (userData.brep) + parseInt (1));
  1363. if(userData.pack ==0) {message.member.removeRole(pack);}
  1364. fs.writeFile("/app/tickets.json", JSON.stringify(tickets), (err) => {if (err) console.error(err)});
  1365.  
  1366. var hits = [
  1367. "https://media1.giphy.com/media/LdsJrFnANh6HS/giphy.gif",
  1368. "https://thumbs.gfycat.com/SecondFeminineDuckbillcat-size_restricted.gif",
  1369. "https://media.giphy.com/media/10a2g22WsRD2Zq/giphy.gif",
  1370. "https://media.giphy.com/media/BDZ9XhMokHGZG/giphy.gif"
  1371. ]
  1372. var randomhits = hits[Math.floor(Math.random() * hits.length)];
  1373.  
  1374.  
  1375. let embed = new Discord.RichEmbed()
  1376. .setColor(0x00AE86)
  1377. .setTitle(`πŸ₯Š **${user.username.toUpperCase()}** was hit with a hard punch from ***${message.author.username.toUpperCase()}***.\n\n -1 ${negrep} Reputation point.`)
  1378. .setImage(randomhits)
  1379. message.channel.send({embed});
  1380. };
  1381.  
  1382.  
  1383. //drop random tickets
  1384. if (message.channel.id != "552628987487059989") {return;}//general
  1385.  
  1386. //chest
  1387. if(messangerRare !=120) {messangerRare = messangerRare + 1;
  1388. }else{
  1389.  
  1390. var rand_resultickets3 = [Math.floor(Math.random(2) * 5)]
  1391. const tick = client.emojis.find(emoji => emoji.name === "ticket");
  1392.  
  1393. let embed = new Discord.RichEmbed()
  1394. .setTitle(`A box with rare items has appeared. Be the first to claim it.`)
  1395. .setImage("https://i.imgur.com/3c0xf59.gif")
  1396. .setColor("#55FFFF")
  1397.  
  1398. message.guild.channels.get('552628987487059989').send({embed: embed}).then(embedMessage => {
  1399.  
  1400. embedMessage.react("πŸ‘")
  1401. .catch(() => console.error('One of the emojis failed to react.'));
  1402.  
  1403. const collector = embedMessage.createReactionCollector((reaction, user) =>user.id != "633719438398586880" && (reaction.emoji.name === 'πŸ‘')).once("collect", reaction => {
  1404. const chosen = reaction.emoji.name;
  1405.  
  1406. if(chosen === 'πŸ‘'){
  1407. if (!tickets[reaction.users.last().id]) tickets[reaction.users.last().id] = {currenttickets:5,pack:0,grep:0,brep:0,rep:0,rareitem:0};
  1408. let userData = tickets[reaction.users.last().id];
  1409. userData.rareitem = (parseInt (userData.rareitem) + parseInt (rand_resultickets3));
  1410. fs.writeFile("/app/tickets.json", JSON.stringify(tickets), (err) => {if (err) console.error(err)});
  1411.  
  1412. let embed = new Discord.RichEmbed()
  1413. .setColor(0x00AE86)
  1414. .setTitle(`${reaction.users.last().username} Collected πŸ‘‘ ${rand_resultickets3} rare items.`)
  1415. message.channel.send({embed});
  1416.  
  1417. }
  1418.  
  1419.  
  1420. collector.stop()});
  1421. });
  1422.  
  1423.  
  1424. messangerRare = 0;
  1425. }
  1426.  
  1427.  
  1428.  
  1429.  
  1430. //common drop
  1431. if(messanger !=200) {messanger = messanger + 1;
  1432. }else{
  1433.  
  1434. let user3 = message.guild.members.random().user;
  1435. var rand_resultickets2 = [Math.floor(Math.random(2) * 5)]
  1436. const posrep = client.emojis.find(emoji => emoji.name === "posrep");
  1437. const negrep = client.emojis.find(emoji => emoji.name === "negrep");
  1438. const tick = client.emojis.find(emoji => emoji.name === "ticket");
  1439.  
  1440. let embed = new Discord.RichEmbed()
  1441. .setTitle(`${user3.username} lost ${rand_resultickets2} ${tick} SocializeMe Tickets.\n\n`)
  1442. .setDescription(`React with πŸ‘ to claim these tickets. You will lose +1 Reputation Points.\n\nReact with πŸ‘Ž to return the tickets to the owner. You will earn +1 Reputation Points`)
  1443. .setColor("#55FFFF")
  1444.  
  1445. message.guild.channels.get('552628987487059989').send({embed: embed}).then(embedMessage => {
  1446.  
  1447. embedMessage.react("πŸ‘")
  1448. .then(() => embedMessage.react("πŸ‘Ž"))
  1449.  
  1450. .catch(() => console.error('One of the emojis failed to react.'));
  1451.  
  1452. const collector = embedMessage.createReactionCollector((reaction, user) =>user.id != "633719438398586880" && (reaction.emoji.name === 'πŸ‘'|| reaction.emoji.name === 'πŸ‘Ž')).once("collect", reaction => {
  1453. const chosen = reaction.emoji.name;
  1454.  
  1455.  
  1456.  
  1457. if(chosen === 'πŸ‘'){
  1458. if (!tickets[reaction.users.last().id]) tickets[reaction.users.last().id] = {currenttickets:5,pack:0,grep:0,brep:0,rep:0,rareitem:0};
  1459. let userData = tickets[reaction.users.last().id];
  1460. userData.currenttickets = (parseInt (userData.currenttickets) + parseInt (rand_resultickets2));
  1461. userData.brep = (parseInt (userData.brep) + parseInt (1));
  1462. fs.writeFile("/app/tickets.json", JSON.stringify(tickets), (err) => {if (err) console.error(err)});
  1463.  
  1464.  
  1465.  
  1466.  
  1467. let embed = new Discord.RichEmbed()
  1468. .setColor(0x00AE86)
  1469. .setTitle(`${reaction.users.last().username} keeps ${rand_resultickets2} ${tick} SocializeMe Tickets for himself/herself and loses -1 ${negrep} Reputation Points.`)
  1470. message.channel.send({embed});
  1471.  
  1472. }
  1473.  
  1474. if(chosen === 'πŸ‘Ž'){
  1475. if (!tickets[reaction.users.last().id]) tickets[reaction.users.last().id] = {currenttickets:5,pack:0,grep:0,brep:0,rep:0,rareitem:0};
  1476. let userData = tickets[reaction.users.last().id];
  1477.  
  1478. userData.grep = (parseInt (userData.grep) + parseInt (1));
  1479. fs.writeFile("/app/tickets.json", JSON.stringify(tickets), (err) => {if (err) console.error(err)});
  1480.  
  1481. let embed = new Discord.RichEmbed()
  1482. .setColor(0x00AE86)
  1483. .setTitle(`${reaction.users.last().username} gives back ${rand_resultickets2} ${tick} SocializeMe Tickets and wins +1 ${posrep} Reputation Points.`)
  1484.  
  1485. message.channel.send({embed});
  1486.  
  1487. }
  1488.  
  1489.  
  1490. collector.stop()});
  1491. });
  1492.  
  1493.  
  1494. messanger = 0;
  1495.  
  1496.  
  1497. }
  1498.  
  1499.  
  1500.  
  1501.  
  1502. });
  1503.  
  1504. client.login(process.env.TOKEN);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement