aboutsummaryrefslogtreecommitdiff
path: root/src/commands/utilities/price.ts
diff options
context:
space:
mode:
authorIRONM00N <64110067+IRONM00N@users.noreply.github.com>2022-07-06 20:28:04 +0200
committerIRONM00N <64110067+IRONM00N@users.noreply.github.com>2022-07-06 20:28:04 +0200
commit22b3a8af49dc16bf5d8f9c3ce48b4770505ea33b (patch)
treeab7f68cb9168d2b06ba144b48311370059cf5fac /src/commands/utilities/price.ts
parent544f94704c9dd37913de11eab67cd594d17fcd87 (diff)
downloadtanzanite-22b3a8af49dc16bf5d8f9c3ce48b4770505ea33b.tar.gz
tanzanite-22b3a8af49dc16bf5d8f9c3ce48b4770505ea33b.tar.bz2
tanzanite-22b3a8af49dc16bf5d8f9c3ce48b4770505ea33b.zip
remove array from add*(...)
Diffstat (limited to 'src/commands/utilities/price.ts')
-rw-r--r--src/commands/utilities/price.ts14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/commands/utilities/price.ts b/src/commands/utilities/price.ts
index c569437..c44b47e 100644
--- a/src/commands/utilities/price.ts
+++ b/src/commands/utilities/price.ts
@@ -86,7 +86,7 @@ export default class PriceCommand extends BushCommand {
// if its a bazaar item then it there should not be any ah data
if (bazaar?.products?.[parsedItem]) {
- priceEmbed.setTitle(`Bazaar Information for ${format.input(parsedItem)}`).addFields([
+ priceEmbed.setTitle(`Bazaar Information for ${format.input(parsedItem)}`).addFields(
{ name: 'Sell Price', value: addBazaarInformation('sellPrice', 2, true) },
{ name: 'Buy Price', value: addBazaarInformation('buyPrice', 2, true) },
{
@@ -97,7 +97,7 @@ export default class PriceCommand extends BushCommand {
},
{ name: 'Current Sell Orders', value: addBazaarInformation('sellOrders', 0, true) },
{ name: 'Current Buy Orders', value: addBazaarInformation('buyOrders', 0, true) }
- ]);
+ );
return await message.util.reply({ embeds: [priceEmbed] });
}
@@ -138,12 +138,10 @@ export default class PriceCommand extends BushCommand {
}
function addPrice(name: string, price: number | undefined) {
if (price)
- priceEmbed.addFields([
- {
- name: name,
- value: price.toLocaleString(undefined, { minimumFractionDigits: 2, maximumFractionDigits: 2 })
- }
- ]);
+ priceEmbed.addFields({
+ name: name,
+ value: price.toLocaleString(undefined, { minimumFractionDigits: 2, maximumFractionDigits: 2 })
+ });
}
}