Skip to content

Commit

Permalink
formated profile number values
Browse files Browse the repository at this point in the history
  • Loading branch information
GhomKrosmonaute committed Oct 24, 2024
1 parent 81cc096 commit 9785f12
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions src/slash/profile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,20 +19,22 @@ 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()
.setTitle(`Profile of ${interaction.user.tag}`)
.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(
{
Expand Down

0 comments on commit 9785f12

Please sign in to comment.