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) const modRoles = mod.roles.cache.map(role => role.id)
if (!modRoles.includes(admin)) { if (!modRoles.includes(admin)) {
await interaction.editReply( await interaction.editReply("You do not have permission to use this command.")
"You do not have permission to use this command."
)
return return
} }

View File

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

View File

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

View File

@@ -152,7 +152,7 @@ export default async function guildTop(interaction: ChatInputCommandInteraction)
let guildData: GuildTopData = [] let guildData: GuildTopData = []
const fieldsValueRaw: string[] = [] const fieldsValueRaw: string[] = []
const allMembersSorted = allMembersDailyGEXP.sort((a, b) => b.gexp - a.gexp) 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) { if (!cachedData) {
cacheStatus = false cacheStatus = false

View File

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

View File

@@ -14,7 +14,8 @@ export = {
color( color(
interaction.user.username + " ran " + interaction.user.username + " ran " +
interaction.commandName + " " + interaction.commandName + " " +
interaction.options.getSubcommand(), "pink" interaction.options.getSubcommand(),
"pink"
) )
) )
} catch { } catch {

View File

@@ -47,8 +47,8 @@ export = {
logToChannel("bot", { logToChannel("bot", {
embeds: [{ embeds: [{
title: "Voice Channel Switch", title: "Voice Channel Switch",
description: userMention(oldState.member!.id) + " switched from " + channelMention(oldChannel.id) + description: userMention(oldState.member!.id) + " switched from " +
" to " + channelMention(newChannel.id), channelMention(oldChannel.id) + " to " + channelMention(newChannel.id),
color: embedColor, color: embedColor,
footer: { footer: {
text: "ID: " + oldState.member!.id, text: "ID: " + oldState.member!.id,