nyx/commands/Economy/profile.js
2021-09-06 18:38:25 +08:00

47 lines
1.7 KiB
JavaScript
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

const { Client, Message, MessageEmbed } = require("discord.js");
module.exports = {
name: "profile",
usage: "(User)",
description: "Check an user economy profile",
category: "Economy",
run: async (client, message, args, data, utils) => {
const user =
message.mentions.members.first() ||
message.guild.members.cache.get(args[0]) ||
message.guild.members.cache.find(
r =>
r.user.username.toLowerCase() === args.join(" ").toLocaleLowerCase()
) ||
message.guild.members.cache.find(
r => r.displayName.toLowerCase() === args.join(" ").toLocaleLowerCase()
) ||
message.member;
const bjwin = await client.bjWin(message.author.id);
const swin = await client.sWin(message.author.id);
const bwin = await client.bWin(message.author.id);
const cmdused = await client.cmdsUSED(message.author.id);
const bal = await client.bal(message.author.id);
const multi = await client.multi(message);
const game = new MessageEmbed()
.setFooter(
`Requested by ${message.author.tag}`,
message.author.displayAvatarURL({ dynamic: true, size: 4096 })
)
.setColor("7196ef")
.setTitle(`${user.displayName}'s profile`)
.addField(
"**Stats**\n",
`🃏 Blackjack wins: \`${bjwin}\`\n` +
`🎰 Slots wins: \`${swin}\`\n` +
`🕹 Bet wins: \`${bwin}\`\n` +
`Commands used: \`${cmdused}\`\n` +
`Totalwins: \`${bjwin + swin + bwin}\``,
true
)
.addField(
"**Balance**\n",
`💲CP: \`${bal}\`\n` + `Multiplier: \`${`1.${multi}x`}\``
);
message.reply(game);
},
};