diff --git a/Commands/Me.js b/Commands/Me.js index 73ebf81..6553dea 100644 --- a/Commands/Me.js +++ b/Commands/Me.js @@ -1,6 +1,6 @@ const Discord = require("discord.js"); const Database = require("../Helpers/Database"); -// exports.onLoad = (client) => {}; + /** * @param {Discord.Client} client * @param {Discord.Message} message @@ -8,10 +8,10 @@ const Database = require("../Helpers/Database"); */ 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); };