Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- console.log('SOCIALIZE ME is ready');
- const http = require('http');
- const express = require('express');
- const app = express();
- app.get("/", (request, response) => {
- console.log(Date.now() + " Ping Received");
- response.sendStatus(200);
- });
- app.listen(process.env.PORT);
- setInterval(() => {
- http.get(`http://${process.env.PROJECT_DOMAIN}.glitch.me/`);
- }, 280000);
- const Discord = require('discord.js');
- const client = new Discord.Client();
- const fs = require("fs");
- let tickets = JSON.parse(fs.readFileSync("/app/tickets.json", "utf8"));
- let pregnant = JSON.parse(fs.readFileSync("/app/pregnant.json", "utf8"));
- var anothershop = false;
- var craterunning = false;
- var in_process2 = false;
- var messanger = 0;
- var messangerRare = 0;
- const jckpotused = new Set();
- const crateused = new Set();
- const falsifyused = new Set();
- const thiefused = new Set();
- client.on('ready', () => {
- console.log(`Logged in as ${client.user.tag}!`);
- client.user.setActivity("SOCIALIZEME SHOP.", { type: "WATCHING"})
- });
- client.on('message', (message) => {
- var pack = message.guild.roles.find(role => role.name === "π");
- var rep = message.guild.roles.find(role => role.name === "β");
- var knife = message.guild.roles.find(role => role.name === "πͺ");
- var cream = message.guild.roles.find(role => role.name === "π¨");
- var ring = message.guild.roles.find(role => role.name === "π");
- var tiger = message.guild.roles.find(role => role.name === "π―");
- var dinner = message.guild.roles.find(role => role.name === "πΎ");
- var fame = message.guild.roles.find(role => role.name === "HALL OF FAME");
- var shop = message.guild.roles.find(role => role.name === "ββββSHOPββββ");
- //help
- if (message.content == "!helpme") {
- let embed = new Discord.RichEmbed()
- .setColor(0x00AE86)
- .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```")
- .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. ```")
- message.channel.send({embed});
- };
- //shop
- if (message.content == '!shop') {
- if(anothershop){message.reply("There is another shop command in process. React to buy an item!β");return;}
- anothershop = true;
- const tick = client.emojis.find(emoji => emoji.name === "ticket");
- let embed = new Discord.RichEmbed()
- .setTitle(`ποΈSOCIALIZE ME SHOPποΈ.\n*React to buy items.\n*Type !currency to check your own amount of tickets.\n`)
- .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`)
- .setFooter("Type !helpme to get a list of all available commands.")
- .setColor("#55FFFF")
- message.channel.send({embed: embed}).then(embedMessage => {
- embedMessage.react("π")
- .then(() => embedMessage.react("π"))
- .then(() => embedMessage.react("β"))
- .then(() => embedMessage.react("β "))
- .then(() => embedMessage.react("πͺ"))
- .then(() => embedMessage.react("π¨"))
- .then(() => embedMessage.react("π"))
- .then(() => embedMessage.react("π―"))
- .then(() => embedMessage.react("πΎ"))
- .then(() => embedMessage.react("π§"))
- .catch(() => console.error('One of the emojis failed to react.'));
- 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 => {
- const chosen = reaction.emoji.name;
- if(chosen === 'π'){
- if (!reaction.message.guild.member(reaction.users.last()).roles.find("name", "ββββSHOPββββ")){reaction.message.guild.member(reaction.users.last()).addRole(shop);}
- 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;}
- if (!tickets[reaction.users.last().id]) tickets[reaction.users.last().id] = {currenttickets:5,pack:0,grep:0,brep:0,rep:0,rareitem:0};
- let userData = tickets[reaction.users.last().id];
- embedMessage.delete()
- 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;}
- userData.currenttickets = (parseInt (userData.currenttickets) - parseInt (100));
- fs.writeFile("/app/tickets.json", JSON.stringify(tickets), (err) => {if (err) console.error(err)});
- let embed = new Discord.RichEmbed()
- .setColor(0x00AE86)
- .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.`)
- message.channel.send({embed});
- reaction.message.guild.member(reaction.users.last()).addRole(fame)
- anothershop = false;
- }
- if(chosen === 'π'){
- if (!reaction.message.guild.member(reaction.users.last()).roles.find("name", "ββββSHOPββββ")){reaction.message.guild.member(reaction.users.last()).addRole(shop);}
- //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;}
- if (!tickets[reaction.users.last().id]) tickets[reaction.users.last().id] = {currenttickets:5,pack:0,grep:0,brep:0,rep:0,rareitem:0};
- let userData = tickets[reaction.users.last().id];
- embedMessage.delete()
- 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;}
- userData.currenttickets = (parseInt (userData.currenttickets) - parseInt (5));
- userData.pack = (parseInt (userData.pack) + parseInt (10));
- fs.writeFile("/app/tickets.json", JSON.stringify(tickets), (err) => {if (err) console.error(err)});
- let embed = new Discord.RichEmbed()
- .setColor(0x00AE86)
- .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.`)
- message.channel.send({embed});
- reaction.message.guild.member(reaction.users.last()).addRole(pack)
- anothershop = false;
- }
- if(chosen === 'β'){
- if (!reaction.message.guild.member(reaction.users.last()).roles.find("name", "ββββSHOPββββ")){reaction.message.guild.member(reaction.users.last()).addRole(shop);}
- //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;}
- if (!tickets[reaction.users.last().id]) tickets[reaction.users.last().id] = {currenttickets:5,pack:0,grep:0,brep:0,rep:0,rareitem:0};
- let userData = tickets[reaction.users.last().id];
- embedMessage.delete()
- 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;}
- userData.currenttickets = (parseInt (userData.currenttickets) - parseInt (5));
- userData.rep = (parseInt (userData.rep) + parseInt (10));
- fs.writeFile("/app/tickets.json", JSON.stringify(tickets), (err) => {if (err) console.error(err)});
- let embed = new Discord.RichEmbed()
- .setColor(0x00AE86)
- .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.`)
- message.channel.send({embed});
- reaction.message.guild.member(reaction.users.last()).addRole(rep)
- anothershop = false;
- }
- if(chosen === 'β '){
- if (!reaction.message.guild.member(reaction.users.last()).roles.find("name", "ββββSHOPββββ")){reaction.message.guild.member(reaction.users.last()).addRole(shop);}
- if (!tickets[reaction.users.last().id]) tickets[reaction.users.last().id] = {currenttickets:5,pack:0,grep:0,brep:0,rep:0,rareitem:0};
- let userData = tickets[reaction.users.last().id];
- embedMessage.delete()
- if(userData.brep ==0) {message.channel.send("```You don't have a bad reputation.```");anothershop = false;return;}
- 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;}
- userData.currenttickets = (parseInt (userData.currenttickets) - parseInt (50));
- userData.brep = 0;
- userData.grep = 0;
- fs.writeFile("/app/tickets.json", JSON.stringify(tickets), (err) => {if (err) console.error(err)});
- let embed = new Discord.RichEmbed()
- .setColor(0x00AE86)
- .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.`)
- message.channel.send({embed});
- anothershop = false;
- }
- if(chosen === 'πͺ'){
- if (!reaction.message.guild.member(reaction.users.last()).roles.find("name", "ββββSHOPββββ")){reaction.message.guild.member(reaction.users.last()).addRole(shop);}
- 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;}
- if (!tickets[reaction.users.last().id]) tickets[reaction.users.last().id] = {currenttickets:5,pack:0,grep:0,brep:0,rep:0,rareitem:0};
- let userData = tickets[reaction.users.last().id];
- embedMessage.delete()
- 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;}
- userData.currenttickets = (parseInt (userData.currenttickets) - parseInt (70));
- fs.writeFile("/app/tickets.json", JSON.stringify(tickets), (err) => {if (err) console.error(err)});
- let embed = new Discord.RichEmbed()
- .setColor(0x00AE86)
- .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.`)
- message.channel.send({embed});
- reaction.message.guild.member(reaction.users.last()).addRole(knife)
- anothershop = false;
- }
- if(chosen === 'π¨'){
- if (!reaction.message.guild.member(reaction.users.last()).roles.find("name", "ββββSHOPββββ")){reaction.message.guild.member(reaction.users.last()).addRole(shop);}
- 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;}
- if (!tickets[reaction.users.last().id]) tickets[reaction.users.last().id] = {currenttickets:5,pack:0,grep:0,brep:0,rep:0,rareitem:0};
- let userData = tickets[reaction.users.last().id];
- embedMessage.delete()
- 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;}
- userData.currenttickets = (parseInt (userData.currenttickets) - parseInt (15));
- fs.writeFile("/app/tickets.json", JSON.stringify(tickets), (err) => {if (err) console.error(err)});
- let embed = new Discord.RichEmbed()
- .setColor(0x00AE86)
- .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.`)
- message.channel.send({embed});
- reaction.message.guild.member(reaction.users.last()).addRole(cream)
- anothershop = false;
- }
- if(chosen === 'π'){
- if (!reaction.message.guild.member(reaction.users.last()).roles.find("name", "ββββSHOPββββ")){reaction.message.guild.member(reaction.users.last()).addRole(shop);}
- 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;}
- if (!tickets[reaction.users.last().id]) tickets[reaction.users.last().id] = {currenttickets:5,pack:0,grep:0,brep:0,rep:0,rareitem:0};
- let userData = tickets[reaction.users.last().id];
- embedMessage.delete()
- 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;}
- userData.currenttickets = (parseInt (userData.currenttickets) - parseInt (50));
- fs.writeFile("/app/tickets.json", JSON.stringify(tickets), (err) => {if (err) console.error(err)});
- let embed = new Discord.RichEmbed()
- .setColor(0x00AE86)
- .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.`)
- message.channel.send({embed});
- anothershop = false;
- reaction.message.guild.member(reaction.users.last()).addRole(ring)
- }
- if(chosen === 'π―'){
- if (!reaction.message.guild.member(reaction.users.last()).roles.find("name", "ββββSHOPββββ")){reaction.message.guild.member(reaction.users.last()).addRole(shop);}
- 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;}
- if (!tickets[reaction.users.last().id]) tickets[reaction.users.last().id] = {currenttickets:5,pack:0,grep:0,brep:0,rep:0,rareitem:0};
- let userData = tickets[reaction.users.last().id];
- embedMessage.delete()
- 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;}
- userData.currenttickets = (parseInt (userData.currenttickets) - parseInt (10));
- fs.writeFile("/app/tickets.json", JSON.stringify(tickets), (err) => {if (err) console.error(err)});
- let embed = new Discord.RichEmbed()
- .setColor(0x00AE86)
- .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.`)
- message.channel.send({embed});
- reaction.message.guild.member(reaction.users.last()).addRole(tiger)
- anothershop = false;
- }
- if(chosen === 'πΎ'){
- if (!reaction.message.guild.member(reaction.users.last()).roles.find("name", "ββββSHOPββββ")){reaction.message.guild.member(reaction.users.last()).addRole(shop);}
- 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;}
- if (!tickets[reaction.users.last().id]) tickets[reaction.users.last().id] = {currenttickets:5,pack:0,grep:0,brep:0,rep:0,rareitem:0};
- let userData = tickets[reaction.users.last().id];
- const tick = client.emojis.find(emoji => emoji.name === "ticket");
- embedMessage.delete()
- 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;}
- userData.currenttickets = (parseInt (userData.currenttickets) - parseInt (20));
- fs.writeFile("/app/tickets.json", JSON.stringify(tickets), (err) => {if (err) console.error(err)});
- let embed = new Discord.RichEmbed()
- .setColor(0x00AE86)
- .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.`)
- message.channel.send({embed});
- reaction.message.guild.member(reaction.users.last()).addRole(dinner)
- anothershop = false;
- }
- if(chosen === 'π§'){
- if (!reaction.message.guild.member(reaction.users.last()).roles.find("name", "ββββSHOPββββ")){reaction.message.guild.member(reaction.users.last()).addRole(shop);}
- if (!tickets[reaction.users.last().id]) tickets[reaction.users.last().id] = {currenttickets:5,pack:0,grep:0,brep:0,rep:0,rareitem:0};
- let userData = tickets[reaction.users.last().id];
- embedMessage.delete()
- if(userData.rareitem ==0) {message.channel.send("```You donβt have any rare items to sell.```");anothershop = false;return;}
- let embed = new Discord.RichEmbed()
- .setColor(0x00AE86)
- .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.`)
- message.channel.send({embed});
- anothershop = false;
- userData.currenttickets = (parseInt (userData.currenttickets) + parseInt (15 * userData.rareitem));
- fs.writeFile("/app/tickets.json", JSON.stringify(tickets), (err) => {if (err) console.error(err)});
- }
- collector.stop()} );
- })
- }
- //admdrop
- //send tickets
- if (message.content == "!admdrop") {
- if(!message.guild.member(message.author).hasPermission("KICK_MEMBERS"))return;
- message.delete();
- let user3 = message.guild.members.random().user;
- var rand_resultickets2 = [Math.floor(Math.random(2) * 5)]
- const tick = client.emojis.find(emoji => emoji.name === "ticket");
- let embed = new Discord.RichEmbed()
- .setTitle(`REACT TO CLAIM ***${rand_resultickets2}*** ${tick} SocializeMe Tickets.\n\n`)
- .setImage("https://cdn.glitch.com/d9506906-5b85-48a9-963e-e99d5e12445b%2Fticketsss.gif")
- .setColor("#55FFFF")
- message.guild.channels.get('552628987487059989').send({embed: embed}).then(embedMessage => {
- embedMessage.react("π")
- .catch(() => console.error('One of the emojis failed to react.'));
- const collector = embedMessage.createReactionCollector((reaction, user) =>user.id != "633719438398586880" && (reaction.emoji.name === 'π')).once("collect", reaction => {
- const chosen = reaction.emoji.name;
- if(chosen === 'π'){
- if (!tickets[reaction.users.last().id]) tickets[reaction.users.last().id] = {currenttickets:5,pack:0,grep:0,brep:0,rep:0,rareitem:0};
- let userData = tickets[reaction.users.last().id];
- userData.currenttickets = (parseInt (userData.currenttickets) + parseInt (rand_resultickets2));
- userData.brep = (parseInt (userData.brep) + parseInt (1));
- fs.writeFile("/app/tickets.json", JSON.stringify(tickets), (err) => {if (err) console.error(err)});
- let embed = new Discord.RichEmbed()
- .setColor(0x00AE86)
- .setTitle(`${reaction.users.last().username} has claimed ${rand_resultickets2} ${tick} SocializeMe Tickets for himself/herself.`)
- message.channel.send({embed});
- }
- collector.stop()});
- });
- }
- //currency
- if (message.content.includes ("!currency")) {
- const tick = client.emojis.find(emoji => emoji.name === "ticket");
- let user2 = message.mentions.users.first();
- if (!user2) {user2=message.author;}
- if(user2.bot == true) {message.reply('π You cant with bots.');return;}
- const posrep = client.emojis.find(emoji => emoji.name === "posrep");
- const negrep = client.emojis.find(emoji => emoji.name === "negrep");
- if (!tickets[user2.id]) tickets[user2.id] = {currenttickets:5,pack:0,grep:0,brep:0,rep:0,rareitem:0};
- let userData = tickets[user2.id];
- var repval= (userData.grep - userData.brep)
- if (userData.grep >= userData.brep){var emo = posrep;}else{var emo = negrep}
- let embed = new Discord.RichEmbed()
- .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}**`)
- .setColor("#55FFFF")
- message.channel.send({embed})
- };
- //jackpot
- if (message.content == '!jackp') {
- if (jckpotused.has(message.author.id)) {message.reply ("β οΈ Wait 1 minute. The !jackp command is on cooldown. β οΈ");return;}
- if (!tickets[message.author.id]) tickets[message.author.id] = {currenttickets:5,pack:0,grep:0,brep:0,rep:0,rareitem:0};
- let userData = tickets[message.author.id];
- const tick = client.emojis.find(emoji => emoji.name === "ticket");
- jckpotused.add(message.author.id);
- var em1 = ["π","π","π"]
- var first = em1[Math.floor(Math.random() * em1.length)];
- var second = em1[Math.floor(Math.random() * em1.length)];
- var third = em1[Math.floor(Math.random() * em1.length)];
- if(third == second && third == first) {
- userData.currenttickets = (parseInt (userData.currenttickets) + parseInt (10));
- fs.writeFile("/app/tickets.json", JSON.stringify(tickets), (err) => {if (err) console.error(err)});
- let embed = new Discord.RichEmbed()
- .setTitle(`| ${first} | ${second} | ${third} |\n\nπ!!!JACKPOT!!!π \nYou Won ${tick} 10 SocializeMe Tickets.`)
- .setDescription(`${message.author.username} ${tick} SocializeMe Tickets: **${userData.currenttickets}**`)
- .setColor("#55FFFF")
- message.channel.send({embed})
- }else{
- let embed = new Discord.RichEmbed()
- .setTitle(`| ${first} | ${second} | ${third} |`)
- .setColor("#55FFFF")
- message.channel.send({embed})
- }
- setTimeout(() => {
- jckpotused.delete(message.author.id);
- }, 60000);
- }
- //crate
- if (message.content == '!crate') {
- if (crateused.has(message.author.id)) {message.reply ("β οΈ Wait 1 hour. The !crate command is on cooldown. β οΈ");return;}
- crateused.add(message.author.id);
- setTimeout(() => {
- crateused.delete(message.author.id);
- }, 3600000);
- if(craterunning){message.reply("There is another !crate command in progress!β");return;}
- craterunning = true;
- var rand_resultickets = [Math.floor(Math.random(2) * 25)]
- var crate = ['π΄','π΅','β«','βͺ'];
- var randcrate = crate[Math.floor(Math.random() * crate.length)];
- const tick = client.emojis.find(emoji => emoji.name === "ticket");
- let embed = new Discord.RichEmbed()
- .setTitle(`React to open the crate and win lots of ${tick} SocializeMe Tickets.`)
- .setImage("http://www.canalgif.net/Gifs-animados/Dinero/Cofres/Imagen-animada-Cofre-19.gif")
- .setColor("#55FFFF")
- message.channel.send({embed: embed}).then(embedMessage => {
- embedMessage.react("π΄")
- .then(() => embedMessage.react("π΅"))
- .then(() => embedMessage.react("β«"))
- .then(() => embedMessage.react("βͺ"))
- .catch(() => console.error('One of the emojis failed to react.'));
- const collector = embedMessage.createReactionCollector((reaction, user) =>user.id != "633719438398586880" && (reaction.emoji.name === randcrate || reaction.emoji.name != randcrate)).once("collect", reaction => {
- const chosen = reaction.emoji.name;
- if(chosen === randcrate){
- if (!tickets[reaction.users.last().id]) tickets[reaction.users.last().id] = {currenttickets:5,pack:0,grep:0,brep:0,rep:0,rareitem:0};
- let userData = tickets[reaction.users.last().id];
- userData.currenttickets = (parseInt (userData.currenttickets) + parseInt (rand_resultickets));
- fs.writeFile("/app/tickets.json", JSON.stringify(tickets), (err) => {if (err) console.error(err)});
- let embed = new Discord.RichEmbed()
- .setColor(0x00AE86)
- .setTitle(`Nice ${reaction.users.last().username} you opened the crate and won ${rand_resultickets} ${tick} SocializeMe Tickets`)
- message.channel.send({embed});
- craterunning = false;
- }
- if(chosen != randcrate){
- let embed = new Discord.RichEmbed()
- .setColor(0x00AE86)
- .setTitle(`NOO!! ${reaction.users.last().username} you failed to open the crate.`)
- message.channel.send({embed});
- craterunning = false;
- }
- collector.stop()});
- })
- }
- //pack
- if (message.content.includes ("!gift π")) {
- let user2 = message.mentions.users.first();
- if (!user2) {message.reply("πYou need to @mention someone.");return;}
- if(user2.bot == true) {message.reply('π You can`t gift BOTs.');return;}
- if(message.mentions.users.first().id === message.author.id) {message.reply("πYou cant gitf yourself.π");return;}
- if (!message.member.roles.find("name", "π")) {message.reply("You donβt own this item.");return;}
- if (message.member.guild.member(user2).roles.find("name", "π")){message.channel.sendMessage("```This user already owns this item.```"); return;}
- if (!tickets[user2.id]) tickets[user2.id] = {currenttickets:5,pack:0,grep:0,brep:0,rep:0};
- let user2Data = tickets[user2.id];
- let userData = tickets[message.author.id];
- user2Data.pack = (parseInt (user2Data.pack) + parseInt (userData.pack));
- userData.pack = 0;
- fs.writeFile("/app/tickets.json", JSON.stringify(tickets), (err) => {if (err) console.error(err)});
- message.member.removeRole(pack);
- message.guild.member(user2).addRole(pack)
- let embed = new Discord.RichEmbed()
- .setColor(0x00AE86)
- .setTitle(`${message.author.username} send a π COMMANDS PACK gift to ${user2.username}`)
- message.channel.send({embed});
- };
- //knife
- if (message.content.includes ("!gift πͺ")) {
- let embed = new Discord.RichEmbed()
- .setColor(0x00AE86)
- .setTitle(`${message.author.username} you cannot gift πͺ KNIFES.`)
- message.channel.send({embed});
- };
- //ring
- if (message.content.includes ("!gift π")) {
- let embed = new Discord.RichEmbed()
- .setColor(0x00AE86)
- .setTitle(`${message.author.username} You canβt gift π Magic Rings`)
- message.channel.send({embed});
- };
- //icecream
- if (message.content.includes ("!gift π¨")) {
- let user2 = message.mentions.users.first();
- if (!user2) {message.reply("πYou need to mention @ someone.");return;}
- if(user2.bot == true) {message.reply('π You canβt gift BOTs.');return;}
- if(message.mentions.users.first().id === message.author.id) {message.reply("πYou canβt gift yourself.π");return;}
- if (!message.member.roles.find("name", "π¨")) {message.reply("You donβt own this item.");return;}
- if (message.member.guild.member(user2).roles.find("name", "π¨")){message.channel.sendMessage("```This user already owns this item```"); return;}
- const posrep = client.emojis.find(emoji => emoji.name === "posrep");
- if (!tickets[message.author.id]) tickets[message.author.id] = {currenttickets:5,pack:0,grep:0,brep:0,rep:0,rareitem:0};
- let userData = tickets[message.author.id];
- userData.grep = (parseInt (userData.grep) + parseInt (2));
- fs.writeFile("/app/tickets.json", JSON.stringify(tickets), (err) => {if (err) console.error(err)});
- message.member.removeRole(cream);
- //message.guild.member(user2).addRole(cream)
- let embed = new Discord.RichEmbed()
- .setColor(0x00AE86)
- .setTitle(`${message.author.username} sent an π¨ ICECREAM as a gift to ${user2.username}.\n\n +2 ${posrep} Reputation point.`)
- message.channel.send({embed});
- };
- //tigerπ―
- if (message.content.includes ("!gift π―")) {
- let user2 = message.mentions.users.first();
- if (!user2) {message.reply("πYou need to @mention someone.");return;}
- if(user2.bot == true) {message.reply('π You canβt gift BOTs.');return;}
- if(message.mentions.users.first().id === message.author.id) {message.reply("πYou canβt gift yourself.π");return;}
- if (!message.member.roles.find("name", "π―")) {message.reply("You donβt own this item.");return;}
- if (message.member.guild.member(user2).roles.find("name", "π―")){message.channel.sendMessage("```This user already owns this item```"); return;}
- message.member.removeRole(tiger);
- message.guild.member(user2).addRole(tiger)
- let embed = new Discord.RichEmbed()
- .setColor(0x00AE86)
- .setTitle(`${message.author.username} sent a π― TIGER as a gift to ${user2.username}`)
- message.channel.send({embed});
- };
- //dinner πΎ
- if (message.content.includes ("!gift πΎ")) {
- let user2 = message.mentions.users.first();
- if (!user2) {message.reply("πYou need to @mention someone.");return;}
- if(user2.bot == true) {message.reply('π You canβt gift BOTs.');return;}
- if(message.mentions.users.first().id === message.author.id) {message.reply("πYou canβt gift yourself.π");return;}
- if (!message.member.roles.find("name", "πΎ")) {message.reply("You donβt own this item.");return;}
- if (message.member.guild.member(user2).roles.find("name", "πΎ")){message.channel.sendMessage("```This user already owns this item```"); return;}
- const posrep = client.emojis.find(emoji => emoji.name === "posrep");
- if (!tickets[message.author.id]) tickets[message.author.id] = {currenttickets:5,pack:0,grep:0,brep:0,rep:0,rareitem:0};
- let userData = tickets[message.author.id];
- userData.grep = (parseInt (userData.grep) + parseInt (5));
- fs.writeFile("/app/tickets.json", JSON.stringify(tickets), (err) => {if (err) console.error(err)});
- message.member.removeRole(dinner);
- let embed = new Discord.RichEmbed()
- .setColor(0x00AE86)
- .setTitle(`${message.author.username} Invited ${user2.username} to a πΎ ROMANTIC DINNER.\n\n +5 ${posrep} Reputation point.`)
- message.channel.send({embed});
- };
- //COMMANDS
- if (message.content == "!falsify") {
- if (!message.member.roles.find("name", "π")) {message.reply("You need a Magic Ring to create tickets.");return;}
- if (falsifyused.has(message.author.id)) {message.reply ("β οΈ Wait 2 minutes. The !falsify command is on cooldown. β οΈ");return;}
- falsifyused.add(message.author.id);
- setTimeout(() => {
- falsifyused.delete(message.author.id);
- }, 120000);
- let userData = tickets[message.author.id];
- var rand_steal = [Math.floor(Math.random(1) * 100)]
- const tick = client.emojis.find(emoji => emoji.name === "ticket");
- const negrep = client.emojis.find(emoji => emoji.name === "negrep");
- if(rand_steal >=50) {
- let embed = new Discord.RichEmbed()
- .setColor(0x00AE86)
- .setTitle(`${message.author.username} You failed falsifying ${tick} SocializeMe Tickets. You also earned -1 ${negrep} Reputation points.`)
- message.channel.send({embed});
- userData.brep= (parseInt (userData.brep) + parseInt (1));
- fs.writeFile("/app/tickets.json", JSON.stringify(tickets), (err) => {if (err) console.error(err)});
- return;
- }
- let embed = new Discord.RichEmbed()
- .setColor(0x00AE86)
- .setTitle(`${message.author.username} You successfully falsified 2 ${tick} SocializeMe Tickets. You also earned -1 ${negrep} Reputation point`)
- message.channel.send({embed});
- userData.currenttickets = (parseInt (userData.currenttickets) + parseInt (2));
- userData.brep= (parseInt (userData.brep) + parseInt (1));
- fs.writeFile("/app/tickets.json", JSON.stringify(tickets), (err) => {if (err) console.error(err)});
- };
- //send tickets
- if (message.content.includes("!tickets")) {
- const user2 = message.mentions.users.first();
- const amount = !!parseInt(message.content.split(' ')[1]) ? parseInt(message.content.split(' ')[1]) : parseInt(message.content.split(' ')[2])
- if (!amount) return message.reply('An amount of tickets to gift must be specified!');
- if (!amount && !user2) return message.reply('A user and an amount of tickets must be specified ');
- if(user2.bot == true) {message.reply('π You canβt gift tickets to BOTs.');return;}
- if(message.mentions.users.first().id === message.author.id) {message.reply("πYou canβt gift tickets to yourself.π");return;}
- if (!tickets[user2.id]) tickets[user2.id] = {currenttickets:0,pack:0,grep:0,brep:0,rep:0,rareitem:0};
- let user2Data = tickets[user2.id];
- let userData = tickets[message.author.id];
- if(userData.currenttickets ==0) {message.reply("You donβt have tickets to gift.")}
- const tick = client.emojis.find(emoji => emoji.name === "ticket");
- user2Data.currenttickets = (parseInt (user2Data.currenttickets) + parseInt (amount));
- userData.currenttickets = (parseInt (userData.currenttickets) - parseInt (amount));
- fs.writeFile("/app/tickets.json", JSON.stringify(tickets), (err) => {if (err) console.error(err)});
- let embed = new Discord.RichEmbed()
- .setColor(0x00AE86)
- .setTitle(`${message.author.username} sent ${tick} ${amount} SocializeMe Tickets to ${user2.username}`)
- message.channel.send({embed});
- };
- //give +rep
- if (message.content.includes("+rep")) {
- 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;}
- let user = message.mentions.users.first();
- if (!user) {message.reply ("πYou need to @mention someone.");return;}
- if(user.bot == true) {message.reply ('π You canβt give reputation point to a BOT.');return;}
- if(message.mentions.users.first().id === message.author.id) {message.reply ("πYou canβt give reputation to yourself.π");return;}
- if (!tickets[user.id]) tickets[user.id] = {currenttickets:5,pack:0,grep:0,brep:0,rep:0,rareitem:0};
- let userData = tickets[message.author.id];
- let user2Data = tickets[user.id];
- const posrep = client.emojis.find(emoji => emoji.name === "posrep");
- userData.rep = (parseInt (userData.rep) - parseInt (1));
- user2Data.grep= (parseInt (user2Data.grep) + parseInt (1));
- if(userData.rep ==0) {message.member.removeRole(rep);}
- fs.writeFile("/app/tickets.json", JSON.stringify(tickets), (err) => {if (err) console.error(err)});
- let embed = new Discord.RichEmbed()
- .setColor(0x00AE86)
- .setTitle(`${message.author.username.toUpperCase()} gave to ${user.username.toUpperCase()} +1 ${posrep} Reputation points.`)
- message.channel.send({embed});
- };
- //give -rep
- if (message.content.includes("-rep")) {
- 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;}
- let user = message.mentions.users.first();
- if (!user) {message.reply ("πYou need to @mention someone.");return;}
- if(user.bot == true) {message.reply ('π You canβt give reputation to a BOT.');return;}
- if(message.mentions.users.first().id === message.author.id) {message.reply ("πYou canβt give reputation to yourself.π");return;}
- if (!tickets[user.id]) tickets[user.id] = {currenttickets:5,pack:0,grep:0,brep:0,rep:0,rareitem:0};
- let userData = tickets[message.author.id];
- let user2Data = tickets[user.id];
- const negrep = client.emojis.find(emoji => emoji.name === "negrep");
- userData.rep = (parseInt (userData.rep) - parseInt (1));
- user2Data.brep= (parseInt (user2Data.brep) + parseInt (1));
- if(userData.rep ==0) {message.member.removeRole(rep);}
- fs.writeFile("/app/tickets.json", JSON.stringify(tickets), (err) => {if (err) console.error(err)});
- let embed = new Discord.RichEmbed()
- .setColor(0x00AE86)
- .setTitle(`${message.author.username.toUpperCase()} gave to ${user.username.toUpperCase()} -1 ${negrep} Reputation points.`)
- message.channel.send({embed});
- };
- //steal
- if (message.content.includes ("!steal")) {
- if(message.author.bot){return;}
- if (thiefused.has(message.author.id)) {message.reply ("β οΈ Wait 2 minutes. The !steal command is on cooldown. β οΈ");return;}
- let user2 = message.mentions.users.first();
- if (!user2) {message.reply("πYou need to @mention someone to steal.");return;}
- if(user2.bot == true) {message.reply('π You canβt steal from BOTs.');return;}
- if(message.mentions.users.first().id === message.author.id) {message.reply("πYou canβt steal yourself.π");return;}
- if (!message.member.roles.find("name", "πͺ")) {message.reply("You need a knife to steal tickets from someone.");return;}
- if (!tickets[user2.id]) {message.reply("This user doesnβt have any tickets.");return;}
- let user2Data = tickets[user2.id];
- let userData = tickets[message.author.id];
- if(user2Data.currenttickets ==0) {message.reply("This user doesnβt have any tickets.");return;}
- thiefused.add(message.author.id);
- setTimeout(() => {
- thiefused.delete(message.author.id);
- }, 120000);
- var rand_steal = [Math.floor(Math.random(1) * 100)]
- if (message.member.guild.member(user2).roles.find("name", "π―")){var failtiger = 10;}else{var failtiger = 70;}
- const negrep = client.emojis.find(emoji => emoji.name === "negrep");
- const tick = client.emojis.find(emoji => emoji.name === "ticket");
- if(rand_steal >=failtiger) {
- let embed = new Discord.RichEmbed()
- .setColor(0x00AE86)
- .setTitle(`${message.author.username} You failed stealing ${tick} SocializeMe Tickets from ${user2.username}. You also earned -1 ${negrep} Reputation points.`)
- message.channel.send({embed});
- userData.brep= (parseInt (userData.brep) + parseInt (1));
- fs.writeFile("/app/tickets.json", JSON.stringify(tickets), (err) => {if (err) console.error(err)});
- return;
- }
- let embed = new Discord.RichEmbed()
- .setColor(0x00AE86)
- .setTitle(`${message.author.username} You have stolen ${user2.username} ${tick} ${user2Data.currenttickets} SocializeMe Tickets. You also earned ${negrep} Reputation point`)
- message.channel.send({embed});
- userData.currenttickets = (parseInt (user2Data.currenttickets) + parseInt (userData.currenttickets));
- user2Data.currenttickets = 0;
- userData.brep= (parseInt (userData.brep) + parseInt (1));
- fs.writeFile("/app/tickets.json", JSON.stringify(tickets), (err) => {if (err) console.error(err)});
- };
- //pat
- if (message.content.includes ("!pat")) {
- 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;}
- let user2 = message.mentions.users.first();
- //returns
- if (!user2) {message.reply("πYou need to mention @ someone.");return;}
- if(user2.bot == true) {message.reply('π You canβt pat BOTs.');return;}
- if(message.mentions.users.first().id === message.author.id) {message.reply("πYou canβt pat yourself.π");return;}
- let userData = tickets[message.author.id];
- userData.pack = (parseInt (userData.pack) - parseInt (1));
- if(userData.pack ==0) {message.member.removeRole(pack);}
- fs.writeFile("/app/tickets.json", JSON.stringify(tickets), (err) => {if (err) console.error(err)});
- var pats = [
- "https://gifimage.net/wp-content/uploads/2017/09/anime-head-pat-gif-5.gif",
- "https://media.tenor.com/images/2ad34a5a1c2bed7bad048b9267ae5ab4/tenor.gif",
- "https://media.tenor.com/images/fcff52c5ce953eaffb54bcbbbbcc5d61/tenor.gif",
- "https://media1.tenor.com/images/63341474f552488b507a3f2a3f27acec/tenor.gif",
- "https://media.tenor.com/images/d4a87cc9b7ae6c81e202e43a6ab271d1/tenor.gif"
- ]
- var randompats = pats[Math.floor(Math.random() * pats.length)];
- let embed = new Discord.RichEmbed()
- .setAuthor("PATS! π")
- .setColor(0x00AE86)
- .setTitle(`**${user2.username.toUpperCase()}**You were patted by **${message.author.username.toUpperCase()}**`)
- .setImage(randompats)
- message.channel.send({embed});
- };
- //pregnant
- if (message.content.includes("!pregnant")) {
- 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;}
- let user = message.mentions.users.first();
- if (!user) {message.reply ("πYou need to mention @ someone.");return;}
- if(user.bot == true) {message.reply ('π You cannot pregnant a bot.');return;}
- if(message.mentions.users.first().id === message.author.id) {message.reply ("πYou cant pregnant yourself.π");return;}
- if (!pregnant[user.username]) pregnant[user.username] = {babys:0};
- message.delete(1000);
- let PuserData = pregnant[user.username];
- let userData = tickets[message.author.id];
- userData.pack = (parseInt (userData.pack) - parseInt (1));
- if(userData.pack ==0) {message.member.removeRole(pack);}
- fs.writeFile("/app/tickets.json", JSON.stringify(tickets), (err) => {if (err) console.error(err)});
- PuserData.babys = (parseInt (PuserData.babys) + parseInt (1));
- fs.writeFile("/app/pregnant.json", JSON.stringify(pregnant), (err) => {if (err) console.error(err)});
- var preg = [
- "https://i.imgur.com/Y1KDmaJ.gif",
- "https://media2.giphy.com/media/v1qCOXAevt2G4/giphy.gif",
- "http://flipanim.com/gifs/rV6HSVMg.gif",
- "https://i.pinimg.com/originals/53/9d/7a/539d7a1be209330b999020840bb9451d.gif",
- "https://media1.tenor.com/images/e632e0fbe053c4f9f0ea319e29f8044c/tenor.gif"
- ]
- var randompreg = preg[Math.floor(Math.random() * preg.length)];
- let embed = new Discord.RichEmbed()
- .setColor(0x00AE86)
- .setTitle(`π€° ${user.username} You have a BABY ON BOARD π€.`)
- .setDescription(`${user.username} babies: **${PuserData.babys}**`)
- .setImage(randompreg)
- .setFooter("Type !pregnant to use it.")
- message.channel.send({embed});
- };
- //shoot
- if (message.content.includes ("!shoot")) {
- 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;}
- let user2 = message.mentions.users.first();
- if (!user2) {user2 = message.author;}
- let userData = tickets[message.author.id];
- userData.pack = (parseInt (userData.pack) - parseInt (1));
- if(userData.pack ==0) {message.member.removeRole(pack);}
- fs.writeFile("/app/tickets.json", JSON.stringify(tickets), (err) => {if (err) console.error(err)});
- if ( (user2 == message.author) || (message.mentions.users.first().id === message.author.id)) {
- let embed = new Discord.RichEmbed()
- .setTitle(`**${message.author.username}** has shot himself. BANG!`)
- .setColor(0x00AE86)
- .setImage("https://media.tenor.com/images/69efbd65d3e9469a2187c4e325d36bc8/tenor.gif")
- message.channel.send({embed});
- }else{
- var shoot = [
- "https://media1.giphy.com/media/vlxoP09DNc8QU/giphy.gif",
- "https://media1.tenor.com/images/e9c914be61acb8f2033f2327605c5562/tenor.gif",
- "https://media.tenor.com/images/bc493788b867de6f4d64d5742d319ce8/tenor.gif",
- "https://thumbs.gfycat.com/DisguisedSimpleAmmonite-small.gif",
- "https://media.tenor.com/images/69efbd65d3e9469a2187c4e325d36bc8/tenor.gif"
- ]
- var randomshoot = shoot[Math.floor(Math.random() * shoot.length)];
- let embed = new Discord.RichEmbed()
- .setTitle(`**${message.author.username}** shoots on **${user2.username}** BANG!`)
- .setColor(0x00AE86)
- .setImage(randomshoot)
- message.channel.send({embed});
- }
- };
- //basement
- if (message.content.includes("!base")) {
- 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;}
- let user = message.mentions.users.first();
- if (!user) {message.reply ("πYou need to mention @ someone.");return;}
- if(user.bot == true) {message.reply ('π You cannot invite a bot.');return;}
- let userData = tickets[message.author.id];
- userData.pack = (parseInt (userData.pack) - parseInt (1));
- if(userData.pack ==0) {message.member.removeRole(pack);}
- fs.writeFile("/app/tickets.json", JSON.stringify(tickets), (err) => {if (err) console.error(err)});
- let embed = new Discord.RichEmbed()
- .setColor(0x00AE86)
- .setDescription(`***${user.username}***. ***${message.author.username}*** invites you to go down to the basement π±. Do you want to go?.`)
- .setImage("https://media.tenor.com/images/68048762da94c1158f05f3326f6c9297/tenor.gif")
- message.channel.send({embed});
- }
- //insult
- if (message.content.includes ("!insult")) {
- 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;}
- let user2 = message.mentions.users.first();
- //returns
- if (!user2) {message.reply("πYou need to mention @ someone.");return;}
- if(user2.bot == true) {message.reply('π You cant insult bots.');return;}
- if(message.mentions.users.first().id === message.author.id) {message.reply("πYou cant insult yourself.π");return;}
- message.delete(1000);
- let userData = tickets[message.author.id];
- userData.pack = (parseInt (userData.pack) - parseInt (1));
- if(userData.pack ==0) {message.member.removeRole(pack);}
- fs.writeFile("/app/tickets.json", JSON.stringify(tickets), (err) => {if (err) console.error(err)});
- let embed = new Discord.RichEmbed()
- .setAuthor("INSULT! π€¬")
- .setColor(0x00AE86)
- .setDescription(`**${user2.username}** You little piece of ||@#!!%%34!@||....`)
- .setFooter("Type !insult to use it.")
- .setImage("https://media1.tenor.com/images/3c54208e17097ceee6ca8b9e5f983851/tenor.gif")
- message.channel.send({embed});
- };
- //lick
- if (message.content.includes ("!lick")) {
- 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;}
- let user2 = message.mentions.users.first();
- //returns
- if (!user2) {message.reply("πYou need to @mention someone.");return;}
- if(user2.bot == true) {message.reply('π You canβt lick a BOT.');return;}
- if(message.mentions.users.first().id === message.author.id) {message.reply("πYou canβt lick yourself.π");return;}
- let userData = tickets[message.author.id];
- userData.pack = (parseInt (userData.pack) - parseInt (1));
- if(userData.pack ==0) {message.member.removeRole(pack);}
- fs.writeFile("/app/tickets.json", JSON.stringify(tickets), (err) => {if (err) console.error(err)});
- var licks = [
- "https://media2.giphy.com/media/d3MKjBSe5zVJ3BLO/giphy.gif",
- "https://media0.giphy.com/media/l3mZd0YH1I6KRPJ3q/giphy.gif",
- "https://i.pinimg.com/originals/ab/54/55/ab545569ce61eac6fe264e81f68d0711.gif",
- "https://media1.tenor.com/images/efd46743771a78e493e66b5d26cd2af1/tenor.gif",
- "https://media3.giphy.com/media/DCAEtqmTVV8CquN3rY/giphy.gif"
- ]
- var randomlicks = licks[Math.floor(Math.random() * licks.length)];
- let embed = new Discord.RichEmbed()
- .setAuthor("LICK π ")
- .setColor(0x00AE86)
- .setDescription(`**${message.author.username}** has licked **${user2.username}**`)
- .setImage(randomlicks)
- message.channel.send({embed});
- };
- //hug
- if (message.content.includes("!hug")) {
- 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;}
- if(in_process2){message.reply("Thers another hug in process!");return;}
- let user2 = message.mentions.users.first();
- if (!user2) {message.reply ("πYou need to mention @ someone.");return;}
- if(user2.bot == true) {message.reply ('π You canβt hug a bot.');return;}
- if(message.mentions.users.first().id === message.author.id) {message.reply ("πYou canβt hug yourself.π");return;}
- let userData = tickets[message.author.id];
- userData.pack = (parseInt (userData.pack) - parseInt (1));
- if(userData.pack ==0) {message.member.removeRole(pack);}
- fs.writeFile("/app/tickets.json", JSON.stringify(tickets), (err) => {if (err) console.error(err)});
- in_process2 = true;
- let embed = new Discord.RichEmbed()
- .setColor(0x00AE86)
- .setTitle(`${message.author.username} wants to hug you ${user2.username} ...π react with one of the emojis below.`)
- message.channel.send({embed: embed}).then(embedMessage => {
- embedMessage.react("π")
- .then(() => embedMessage.react("π"))
- .then(() => embedMessage.react("π"))
- .catch(() => console.error('One of the emojis failed to react.'));
- const filter = (reaction, user) => {
- return ['π', 'π','π'].includes(reaction.emoji.name) && user.id === user2.id;
- };
- embedMessage.awaitReactions(filter, { max: 1, time: 15000, errors: ['time'] })
- .then(collected => {
- const reaction = collected.first();
- if (reaction.emoji.name === 'π') {
- var hugs = [
- "https://i.imgur.com/VgP2ONn.gif",
- "https://i.pinimg.com/originals/b1/18/9e/b1189e353db0bed3521885bec284264b.gif",
- "https://media1.tenor.com/images/62a6c2e1399364bfb280a08232c4c0ad/tenor.gif",
- "https://i.pinimg.com/originals/42/99/78/4299787942726aa1a232a81c8a3f226b.gif",
- "https://media.tenor.com/images/708276a6666cbe55f9583b8c1dcdc67b/tenor.gif"
- ]
- var randomhugs = hugs[Math.floor(Math.random() * hugs.length)];
- let embed = new Discord.RichEmbed()
- .setColor(0x00AE86)
- .setTitle("β£οΈβ£οΈβ£οΈWHAT A NICE HUGβ£οΈβ£οΈβ£οΈ")
- .setImage(randomhugs)
- message.channel.send({embed});
- in_process2 = false;
- }
- if (reaction.emoji.name === 'π') {
- let embed = new Discord.RichEmbed()
- .setColor(0x00AE86)
- .setTitle(`**${user2.username}** π punches you. He/she doesn't want your hug.`)
- .setImage("http://giphygifs.s3.amazonaws.com/media/P4l2ET85UuedO/giphy.gif")
- message.channel.send({embed});
- in_process2 = false;
- }
- if (reaction.emoji.name === 'π') {
- let embed = new Discord.RichEmbed()
- .setColor(0x00AE86)
- .setTitle(`**${user2.username}** π€¬doesn't want your hug...`)
- .setImage("https://media.giphy.com/media/AT2OTjFge4JnW/giphy.gif")
- message.channel.send({embed});
- in_process2 = false;
- }
- })
- .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;})
- });
- };
- //sex
- if (message.content.includes("!sex")) {
- if(! message.member.roles.find("name", "π")) { message.reply("Sorry!. You dont have π Commands Pack.Type !shop to Buy them in the Shop.");return;}
- if(in_process2){message.reply("Thers another command in process!");return;}
- let user2 = message.mentions.users.first();
- if (!user2) {message.reply ("πYou need to mention @ someone.");return;}
- if(user2.bot == true) {message.reply ('π You cannot do it with a bot.');return;}
- if(message.mentions.users.first().id === message.author.id) {message.reply ("πYou can, but really not with yourself.π");return;}
- let userData = tickets[message.author.id];
- userData.pack = (parseInt (userData.pack) - parseInt (1));
- if(userData.pack ==0) {message.member.removeRole(pack);}
- fs.writeFile("/app/tickets.json", JSON.stringify(tickets), (err) => {if (err) console.error(err)});
- in_process2 = true;
- let embed = new Discord.RichEmbed()
- .setColor(0x00AE86)
- .setTitle(`${message.author.username} Wants to "make babys with you ${user2.username} ...π react below.`)
- message.channel.send({embed: embed}).then(embedMessage => {
- embedMessage.react("π")
- .then(() => embedMessage.react("π"))
- .then(() => embedMessage.react("π"))
- .catch(() => console.error('One of the emojis failed to react.'));
- const filter = (reaction, user) => {
- return ['π', 'π','π'].includes(reaction.emoji.name) && user.id === user2.id;
- };
- embedMessage.awaitReactions(filter, { max: 1, time: 15000, errors: ['time'] })
- .then(collected => {
- const reaction = collected.first();
- if (reaction.emoji.name === 'π') {
- var sex = [
- "https://thumbs.gfycat.com/CluelessTintedKoala-size_restricted.gif",
- "https://media1.tenor.com/images/d2b00918b2b6659915b79086d77087b9/tenor.gif",
- "https://media.giphy.com/media/9x1oYUXFD1AUB7eCkf/giphy.gif"
- ]
- var randomsex = sex[Math.floor(Math.random() * sex.length)];
- let embed = new Discord.RichEmbed()
- .setColor(0x00AE86)
- .setTitle("β£οΈβ£οΈβ£οΈ OH GOD THOSE TWO...β£οΈβ£οΈβ£οΈ")
- .setImage(randomsex)
- message.channel.send({embed});
- in_process2 = false;
- }
- if (reaction.emoji.name === 'π') {
- let embed = new Discord.RichEmbed()
- .setColor(0x00AE86)
- .setTitle(`**${user2.username}** π has hit you. Doesn't want make babys..`)
- .setImage("https://media.tenor.com/images/8a26afa7f1c0e607c283c559a333d453/tenor.gif")
- message.channel.send({embed});
- in_process2 = false;
- }
- if (reaction.emoji.name === 'π') {
- let embed = new Discord.RichEmbed()
- .setColor(0x00AE86)
- .setTitle(`**${user2.username}** π€¬Doesn't want make babys...`)
- .setImage("https://media1.tenor.com/images/13f08a96bd6a1d7ce360ec5facd0952c/tenor.gif")
- message.channel.send({embed});
- in_process2 = false;
- }
- })
- .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;})
- });
- };
- //kiss
- if (message.content.includes("!kiss")) {
- 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;}
- let user = message.mentions.users.first();
- if (!user) {message.reply ("πYou need to @mention someone.");return;}
- if(user.bot == true) {message.reply ('π You canβt kiss a bot.');return;}
- if(message.mentions.users.first().id === message.author.id) {message.reply ("πYou canβt kiss yourself.π");return;}
- let userData = tickets[message.author.id];
- userData.pack = (parseInt (userData.pack) - parseInt (1));
- if(userData.pack ==0) {message.member.removeRole(pack);}
- fs.writeFile("/app/tickets.json", JSON.stringify(tickets), (err) => {if (err) console.error(err)});
- var kisses = [
- "https://media1.tenor.com/images/3633e90e9bb3298311aa8f855b64b973/tenor.gif",
- "https://i.pinimg.com/originals/e9/e8/c2/e9e8c27d2b8263e92997e1ff32896703.gif",
- "https://media.tenor.com/images/e68c95656b5d700bb3b0dd981dad98ec/tenor.gif",
- "https://media1.tenor.com/images/543f2c219342ff89d9fed74558421f2d/tenor.gif"
- ]
- var randomkisses = kisses[Math.floor(Math.random() * kisses.length)];
- let embed = new Discord.RichEmbed()
- .setColor(0x00AE86)
- .setTitle(`**${user.username}** WAS KISSED BY **${message.author.username}**`)
- .setImage(randomkisses)
- message.channel.send({embed});
- };
- //hit
- if (message.content.includes("!hit")) {
- 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;}
- let user = message.mentions.users.first();
- if (!user) {message.reply ("πYou need to @mention someone.");return;}
- if(user.bot == true) {message.reply ('π You canβt hit a BOT.');return;}
- if(message.mentions.users.first().id === message.author.id) {message.reply ("πYou canβt hit yourself.π");return;}
- const negrep = client.emojis.find(emoji => emoji.name === "negrep");
- let userData = tickets[message.author.id];
- userData.pack = (parseInt (userData.pack) - parseInt (1));
- userData.brep= (parseInt (userData.brep) + parseInt (1));
- if(userData.pack ==0) {message.member.removeRole(pack);}
- fs.writeFile("/app/tickets.json", JSON.stringify(tickets), (err) => {if (err) console.error(err)});
- var hits = [
- "https://media1.giphy.com/media/LdsJrFnANh6HS/giphy.gif",
- "https://thumbs.gfycat.com/SecondFeminineDuckbillcat-size_restricted.gif",
- "https://media.giphy.com/media/10a2g22WsRD2Zq/giphy.gif",
- "https://media.giphy.com/media/BDZ9XhMokHGZG/giphy.gif"
- ]
- var randomhits = hits[Math.floor(Math.random() * hits.length)];
- let embed = new Discord.RichEmbed()
- .setColor(0x00AE86)
- .setTitle(`π₯ **${user.username.toUpperCase()}** was hit with a hard punch from ***${message.author.username.toUpperCase()}***.\n\n -1 ${negrep} Reputation point.`)
- .setImage(randomhits)
- message.channel.send({embed});
- };
- //drop random tickets
- if (message.channel.id != "552628987487059989") {return;}//general
- //chest
- if(messangerRare !=120) {messangerRare = messangerRare + 1;
- }else{
- var rand_resultickets3 = [Math.floor(Math.random(2) * 5)]
- const tick = client.emojis.find(emoji => emoji.name === "ticket");
- let embed = new Discord.RichEmbed()
- .setTitle(`A box with rare items has appeared. Be the first to claim it.`)
- .setImage("https://i.imgur.com/3c0xf59.gif")
- .setColor("#55FFFF")
- message.guild.channels.get('552628987487059989').send({embed: embed}).then(embedMessage => {
- embedMessage.react("π")
- .catch(() => console.error('One of the emojis failed to react.'));
- const collector = embedMessage.createReactionCollector((reaction, user) =>user.id != "633719438398586880" && (reaction.emoji.name === 'π')).once("collect", reaction => {
- const chosen = reaction.emoji.name;
- if(chosen === 'π'){
- if (!tickets[reaction.users.last().id]) tickets[reaction.users.last().id] = {currenttickets:5,pack:0,grep:0,brep:0,rep:0,rareitem:0};
- let userData = tickets[reaction.users.last().id];
- userData.rareitem = (parseInt (userData.rareitem) + parseInt (rand_resultickets3));
- fs.writeFile("/app/tickets.json", JSON.stringify(tickets), (err) => {if (err) console.error(err)});
- let embed = new Discord.RichEmbed()
- .setColor(0x00AE86)
- .setTitle(`${reaction.users.last().username} Collected π ${rand_resultickets3} rare items.`)
- message.channel.send({embed});
- }
- collector.stop()});
- });
- messangerRare = 0;
- }
- //common drop
- if(messanger !=200) {messanger = messanger + 1;
- }else{
- let user3 = message.guild.members.random().user;
- var rand_resultickets2 = [Math.floor(Math.random(2) * 5)]
- const posrep = client.emojis.find(emoji => emoji.name === "posrep");
- const negrep = client.emojis.find(emoji => emoji.name === "negrep");
- const tick = client.emojis.find(emoji => emoji.name === "ticket");
- let embed = new Discord.RichEmbed()
- .setTitle(`${user3.username} lost ${rand_resultickets2} ${tick} SocializeMe Tickets.\n\n`)
- .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`)
- .setColor("#55FFFF")
- message.guild.channels.get('552628987487059989').send({embed: embed}).then(embedMessage => {
- embedMessage.react("π")
- .then(() => embedMessage.react("π"))
- .catch(() => console.error('One of the emojis failed to react.'));
- const collector = embedMessage.createReactionCollector((reaction, user) =>user.id != "633719438398586880" && (reaction.emoji.name === 'π'|| reaction.emoji.name === 'π')).once("collect", reaction => {
- const chosen = reaction.emoji.name;
- if(chosen === 'π'){
- if (!tickets[reaction.users.last().id]) tickets[reaction.users.last().id] = {currenttickets:5,pack:0,grep:0,brep:0,rep:0,rareitem:0};
- let userData = tickets[reaction.users.last().id];
- userData.currenttickets = (parseInt (userData.currenttickets) + parseInt (rand_resultickets2));
- userData.brep = (parseInt (userData.brep) + parseInt (1));
- fs.writeFile("/app/tickets.json", JSON.stringify(tickets), (err) => {if (err) console.error(err)});
- let embed = new Discord.RichEmbed()
- .setColor(0x00AE86)
- .setTitle(`${reaction.users.last().username} keeps ${rand_resultickets2} ${tick} SocializeMe Tickets for himself/herself and loses -1 ${negrep} Reputation Points.`)
- message.channel.send({embed});
- }
- if(chosen === 'π'){
- if (!tickets[reaction.users.last().id]) tickets[reaction.users.last().id] = {currenttickets:5,pack:0,grep:0,brep:0,rep:0,rareitem:0};
- let userData = tickets[reaction.users.last().id];
- userData.grep = (parseInt (userData.grep) + parseInt (1));
- fs.writeFile("/app/tickets.json", JSON.stringify(tickets), (err) => {if (err) console.error(err)});
- let embed = new Discord.RichEmbed()
- .setColor(0x00AE86)
- .setTitle(`${reaction.users.last().username} gives back ${rand_resultickets2} ${tick} SocializeMe Tickets and wins +1 ${posrep} Reputation Points.`)
- message.channel.send({embed});
- }
- collector.stop()});
- });
- messanger = 0;
- }
- });
- client.login(process.env.TOKEN);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement