Add a /myinfo command that replies with the member XP and coins, visible only to the person who ran it
Shows members their XP level and coin balance in a private reply.
Commands:
/myinfo — View your level, XP, and coins (visible only to you)Made by MEE6. Remix it to get a copy of your own and change anything you like.
Stats for You
4
820
180
/**
* Member Info - Shows a member their XP and coins
*/
mee6.command(
'myinfo',
{
description: 'View your XP and coins',
ephemeral: true, // Private reply
},
async (ctx) => {
// Fetch XP data
const xpData = await mee6.xp.get(ctx.author.id);
// Fetch economy data
const economyData = await mee6.economy.balance(ctx.author.id);
await ctx.reply({
embed: {
title: '📊 Your Info',
description: `Stats for ${ctx.author.displayName}`,
color: '#5865F2',
fields: [
{
name: '⭐ Level',
value: `${xpData.level}`,
inline: true,
},
{
name: '✨ XP',
value: `${xpData.xp}`,
inline: true,
},
{
name: '💰 Coins',
value: `${economyData.coins}`,
inline: true,
},
],
thumbnail_url: ctx.author.avatarUrl,
},
});
}
);