Skip to content
This repository has been archived by the owner on Jan 4, 2023. It is now read-only.

Commit

Permalink
Update Me.js
Browse files Browse the repository at this point in the history
  • Loading branch information
aloshai authored Sep 30, 2020
1 parent a7c2268 commit 0d51375
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Commands/Me.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
const Discord = require("discord.js");
const Database = require("../Helpers/Database");
// exports.onLoad = (client) => {};

/**
* @param {Discord.Client} client
* @param {Discord.Message} message
* @param {Array<String>} args
*/
exports.run = async (client, message, args) => {
const db = new Database("./Servers/" + message.guild.id, "Invites");
var victim = message.mentions.users.first() || client.users.cache.get(args[0]);
var victim = message.mentions.users.first() || client.users.cache.get(args[0]) || message.author;
var data = db.get(`invites.${victim.id}`) || { total: 0, fake: 0, inviter: null, regular: 0, bonus: 0, leave: 0 };
var embed = new Discord.MessageEmbed()
.setDescription(`**Total:** \`${(data.total || 0) + (data.bonus || 0)}\`, **Regular:** \`${data.regular || 0}\`, **Bonus:** \`${data.bonus || 0}\`, **Leave:** \`${data.leave || 0}\`, (**Fake:** \`${data.fake || 0}\`)`)
.setDescription(`You have **${(data.total || 0) + (data.bonus || 0)}** invites! (**${data.regular || 0}** regular, **${data.bonus || 0}** bonus, **${data.leave || 0}** leaves, **${data.fake || 0}** fake)`)
.setColor("RANDOM");
message.channel.send(embed);
};
Expand Down

0 comments on commit 0d51375

Please sign in to comment.