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

@@ -59,9 +59,7 @@ export = {
const modRoles = mod.roles.cache.map(role => role.id)
if (!modRoles.includes(admin)) {
await interaction.editReply(
"You do not have permission to use this command."
)
await interaction.editReply("You do not have permission to use this command.")
return
}

View File

@@ -60,7 +60,8 @@ export = {
await interaction.editReply({
embeds: [{
description: "Successfully updated `" + setting + "` to value `" + value + "`."
description: "Successfully updated `" + setting + "` to value `" + value + "`.",
color: embedColor
}]
})
}

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

View File

@@ -79,11 +79,11 @@ export = {
const subcommand = interaction.options.getSubcommand()
const channel = interaction.options.getChannel("channel") as TextChannel
const embedColor = Number(color.replace("#", "0x"))
let title: string = ""
let description: string = ""
let customId: string = ""
let label: string = ""
let emoji: string = ""
let title = ""
let description = ""
let customId = ""
let label = ""
let emoji = ""
if (subcommand === "sendguildapplication") {
title = "Guild Application"