Advertisement
Guest User

ginna wilder

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