Small tweaks to fomating

This commit is contained in:
2024-01-20 21:23:03 +01:00
parent 1ffcaf602d
commit 49020945ff
8 changed files with 16 additions and 19 deletions

View File

@@ -129,8 +129,7 @@ export default async function guildInfo(interaction: ChatInputCommandInteraction
const guildOwner = guildMembers.find(m => m.rank === "Guild Master")!.uuid
const guildOwnerName = await getIGN(guildOwner)
const guildRanksUnsorted = guild!.ranks.sort((a, b) => b.priority - a.priority
)
const guildRanksUnsorted = guild!.ranks.sort((a, b) => b.priority - a.priority)
const guildRanks = guildRanksUnsorted.map(r => "**➺ " + r.name + "** `[" + r.tag + "]`").join("\n")
const allGuildMembersWeeklyXP = guildMembers.map(member => member.expHistory)
@@ -156,8 +155,7 @@ export default async function guildInfo(interaction: ChatInputCommandInteraction
},
{
name: "**GEXP**",
value:
"**➺ Total weekly GEXP:** `" + totalGuildMembersWeeklyXP + "`\n" +
value: "**➺ Total weekly GEXP:** `" + totalGuildMembersWeeklyXP + "`\n" +
"**➺ Daily avarage:** `" + averageGuildMembersWeeklyXP + "`\n" +
"**➺ Total GEXP:** `" + guildExp + "`"
},

View File

@@ -143,8 +143,7 @@ export default async function guildMember(interaction: ChatInputCommandInteracti
},
{
name: "**Weekly GEXP**",
value:
"**➺ Total:** `" + totalWeeklyGexp + "`\n" +
value: "**➺ Total:** `" + totalWeeklyGexp + "`\n" +
"**➺ Daily avarage:** `" + averageWeeklyGexp + "`"
},
{

View File

@@ -152,7 +152,7 @@ export default async function guildTop(interaction: ChatInputCommandInteraction)
let guildData: GuildTopData = []
const fieldsValueRaw: string[] = []
const allMembersSorted = allMembersDailyGEXP.sort((a, b) => b.gexp - a.gexp)
const allMembersSortedUUIDArray = allMembersSorted.map(member => { return member.uuid })
const allMembersSortedUUIDArray = allMembersSorted.map(member => member.uuid)
if (!cachedData) {
cacheStatus = false