update/Prettify money values

This commit is contained in:
SowinskiBraeden committed 2023-09-03 19:05:45 -07:00
1 parent d92c7a927b
commit 26bf295765
4 files changed
+5 -5

No files matched your search

+2 -2
View File
@@ -127,7 +127,7 @@ module.exports = {
const successEmbed = new EmbedBuilder()
.setTitle('Success')
.setDescription(`Successfully set a **$${args[0].options[1].value.toFixed(2)}** bounty on \` ${playerStat.gamertag} \`\nThis can be viewed using </bounty view:1086786904671924267>`)
.setDescription(`Successfully set a **$${args[0].options[1].value.toFixed(2).toLocaleString(undefined, {minimumFractionDigits: 2, maximumFractionDigits: 2})}** bounty on \` ${playerStat.gamertag} \`\nThis can be viewed using </bounty view:1086786904671924267>`)
.setColor(client.config.Colors.Green);
if (anonymous && anonymous.value) return interaction.send({ embeds: [successEmbed], flags: (1 << 6) });
@@ -193,7 +193,7 @@ module.exports = {
for (let i = 0; i < activeBounties.length; i++) {
for (let j = 0; j < activeBounties[i].bounties.length; j++) {
bountiesEmbed.addFields({ name: `${activeBounties[i].gamertag} has a:`, value: `**$${activeBounties[i].bounties[j].value.toFixed(2)}** bounty set by ${activeBounties[i].bounties[j].setBy == null ? 'Anonymous' : `<@${activeBounties[i].bounties[j].setBy}>`}`, inline: false });
bountiesEmbed.addFields({ name: `${activeBounties[i].gamertag} has a:`, value: `**$${activeBounties[i].bounties[j].value.toFixed(2).toLocaleString(undefined, {minimumFractionDigits: 2, maximumFractionDigits: 2})}** bounty set by ${activeBounties[i].bounties[j].setBy == null ? 'Anonymous' : `<@${activeBounties[i].bounties[j].setBy}>`}`, inline: false });
}
}
+1 -1
View File
@@ -95,7 +95,7 @@ module.exports = {
let description = `**You collected**`;
for (let i = 0; i < roles.length; i++) {
description += `\n<@&${roles[i]}> - $**${income[i].toFixed(2)}**`
description += `\n<@&${roles[i]}> - $**${income[i].toFixed(2).toLocaleString(undefined, {minimumFractionDigits: 2, maximumFractionDigits: 2})}**`
}
const success = new EmbedBuilder()
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "dayzr-bot",
"version": "9.5.1",
"version": "9.5.2",
"description": "A General Purpose Discord Bot for DayZ Nitrado Servers.",
"main": "index.js",
"nodemonConfig": {
+1 -1
View File
@@ -155,7 +155,7 @@ module.exports = {
receivedBounty = new EmbedBuilder()
.setColor(client.config.Colors.Default)
.setDescription(`<@${killerStat.discordID}> received **$${totalBounty.toFixed(2)}** in bounty rewards.`);
.setDescription(`<@${killerStat.discordID}> received **$${totalBounty.toFixed(2).toLocaleString(undefined, {minimumFractionDigits: 2, maximumFractionDigits: 2})}** in bounty rewards.`);
victimStat.bounties = []; // clear bounties after claimed
}