From a8c64296a0210b53e94b947a2c3da409dcfe9586 Mon Sep 17 00:00:00 2001 From: O3H Date: Sat, 10 Aug 2024 15:06:04 +0100 Subject: [PATCH] Update nation.ts --- aurora/slashcommands/nation.ts | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/aurora/slashcommands/nation.ts b/aurora/slashcommands/nation.ts index 1156ffb4..014b0d5c 100644 --- a/aurora/slashcommands/nation.ts +++ b/aurora/slashcommands/nation.ts @@ -244,7 +244,7 @@ export default { : nationResLength >= 0 ? "Leader " : "" // Includes prefix - const nationName = nationResLength >= 60 ? "The " + nation.name + " Realm" + const nationLabel = nationResLength >= 60 ? "The " + nation.name + " Realm" : nationResLength >= 40 ? "The " + nation.name + " Empire" : nationResLength >= 30 ? "Kingdom of " + nation.name : nationResLength >= 20 ? "Dominion of " + nation.name @@ -260,15 +260,20 @@ export default { //#region Embed Stuff const [capitalX, capitalZ] = [nation.capital.x, nation.capital.z] const mapUrl = Aurora.buildMapLink({ x: capitalX, z: capitalZ }, 5) + + const nationName = nation.wiki ? `[${nationLabel}](${nation.wiki})` : backtick(nationLabel) - nationEmbed.setTitle("Nation Info | " + nationName + " | #" + nationRank) + const area = Math.round(nation.area) + const worth = Math.round(nation.area * 16) + + nationEmbed.setTitle(`Nation Info | ${nationName} | #${nationRank}`) .setThumbnail(nation.flag || 'attachment://aurora.png') .setFooter(devsFooter(client)) .addFields( embedField("King", backtick(nation.king, { prefix: kingPrefix }), true), - embedField("Capital", `\`${nation.capital.name}\``, true), + embedField("Capital", backtick(nation.capital.name), true), embedField("Location", `[${capitalX}, ${capitalZ}](${mapUrl.toString()})`, true), - embedField("Size/Worth", `Chunks: \`${nation.area.toString()}\`\nGold: \`${(nation.area * 16)}\``, true), + embedField("Size/Worth", `Chunks: \`${area.toString()}\`\nGold: \`${worth}\``, true), embedField("Residents", `\`${nationResLength.toString()}\``, true), embedField("Bonus Grant", `\`${auroraNationBonus(nationResLength).toString()}\``, true) )