Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const command = 'opt-in'
- const command2 = 'opt-out'
- const command3 = 'opt-in -y'
- let user = message.author
- let dataLog = client.guilds.find("id", "586817026522218507").channels.find("name","data-collection-logs")
- let optEmbed = new Discord.RichEmbed()
- .setTitle("Data Collection Opt-In")
- .setColor(0xFF0000)
- .setTimestamp()
- .setDescription(`Hey there <@${user.id}>, I see you've found my latest update! As per the new Discord Developer Terms of Service, I now have to get your permission to collect your data. Now, before you get concerned, you should know the only data I collect on you is your account creation date, the day you joined the server, and your username and ID when you run the /userinfo command. These pieces of information are all publicly accessable with the Discord API and SDK. That being said, you now have a choice.`)
- .addField("Agree To Opt-In", `nb/${command} -y`)
- .addField("Disagree To Opt-In", `nb/${command2} -y`)
- .addField("Please Note", "If you choose no We **WILL NOT** Store and use your data")
- .setFooter(`© Ninja Bot v1.00`);
- message.delete().catch()
- if(!args[0]) return message.channel.send(optEmbed)
- let optEmbed2 = new Discord.RichEmbed()
- .setTitle("Opt-In Successful :white_check_mark:")
- .setColor(0xFF0000)
- .setTimestamp()
- .setDescription(`<@${message.author.id}> Thanks for Opting in!!`)
- .setFooter(`© Ninja Bot v1.00`);
- let optEmbed3 = new Discord.RichEmbed()
- .setTitle("Data Collection Log")
- .setColor(0xFF0000)
- .setTimestamp()
- .setDescription("A user has Opted in to Data Collection")
- .addField("User Opted", `<@${user.id}>#${user.discriminator}`)
- .addField("User Tag", `${user.username}#${user.discriminator}`)
- .addField("Opted Server", `${message.channel.guild}`)
- .setFooter(`© Ninja Bot v1.00`);
- //dataLog.send(`@${user.username} has just opted into data collection`) //OutDated Causes Duplicate
- dataLog.send(optEmbed3) //OutDated Causes Duplicate
- message.delete().catch()
- if(args[0] === "-y") return message.channel.send(optEmbed2).then(console.log(`${user.username} has just opted into data collection.`))
- //if(args[0] === "-y") return message.channel.send(optEmbed3);
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement