diff --git a/src/slash/profile.ts b/src/slash/profile.ts index ab6cfa9..f537c3e 100644 --- a/src/slash/profile.ts +++ b/src/slash/profile.ts @@ -19,6 +19,10 @@ export default new app.SlashCommand({ const pointRank = await app.getPointRank(interaction.user) + const messagesSent = await messageTable.cache.count( + `author_id = ${user._id} AND guild_id = ${guild._id}`, + ) + return interaction.reply({ embeds: [ new app.EmbedBuilder() @@ -26,13 +30,11 @@ export default new app.SlashCommand({ .setThumbnail(interaction.user.displayAvatarURL()) .setDescription( (pointRank - ? `Helper rank: **#${pointRank.rank}** (**${user.points}** pts)\n` + ? `Helper rank: **#${pointRank.rank}** (**${user.points.toLocaleString()}** pts)\n` : "") + - `Total money: **${user.coins}** 🪙\n` + - `Hourly money: **${Math.floor(app.getUserHourlyCoins(user))}** 🪙\n` + - `Messages sent: **${await messageTable.cache.count( - `author_id = ${user._id} AND guild_id = ${guild._id}`, - )}**`, + `Total money: **${user.coins.toLocaleString()}** 🪙\n` + + `Hourly money: **${Math.floor(app.getUserHourlyCoins(user)).toLocaleString()}** 🪙\n` + + `Messages sent: **${messagesSent.toLocaleString()}**`, ) .setFields( {