update/Prettify money values
This commit is contained in:
4 files changed
+5
-5
No files matched your search
+2
-2
@@ -127,7 +127,7 @@ module.exports = {
|
|||||||
|
|
||||||
const successEmbed = new EmbedBuilder()
|
const successEmbed = new EmbedBuilder()
|
||||||
.setTitle('Success')
|
.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);
|
.setColor(client.config.Colors.Green);
|
||||||
|
|
||||||
if (anonymous && anonymous.value) return interaction.send({ embeds: [successEmbed], flags: (1 << 6) });
|
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 i = 0; i < activeBounties.length; i++) {
|
||||||
for (let j = 0; j < activeBounties[i].bounties.length; j++) {
|
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 });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -95,7 +95,7 @@ module.exports = {
|
|||||||
|
|
||||||
let description = `**You collected**`;
|
let description = `**You collected**`;
|
||||||
for (let i = 0; i < roles.length; i++) {
|
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()
|
const success = new EmbedBuilder()
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "dayzr-bot",
|
"name": "dayzr-bot",
|
||||||
"version": "9.5.1",
|
"version": "9.5.2",
|
||||||
"description": "A General Purpose Discord Bot for DayZ Nitrado Servers.",
|
"description": "A General Purpose Discord Bot for DayZ Nitrado Servers.",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"nodemonConfig": {
|
"nodemonConfig": {
|
||||||
|
|||||||
@@ -155,7 +155,7 @@ module.exports = {
|
|||||||
|
|
||||||
receivedBounty = new EmbedBuilder()
|
receivedBounty = new EmbedBuilder()
|
||||||
.setColor(client.config.Colors.Default)
|
.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
|
victimStat.bounties = []; // clear bounties after claimed
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user