Replaced clang format with prettuier (sadly)

This commit is contained in:
2023-12-28 16:47:52 +01:00
parent ca5bbd0b81
commit 117140fe9d
99 changed files with 13519 additions and 12011 deletions

View File

@@ -13,48 +13,62 @@ export = {
data: new SlashCommandBuilder()
.setName("uuid")
.setDescription("Get a player's UUID")
.addStringOption(option => option
.setName("ign")
.setDescription("Player's name")
.setRequired(true)),
.addStringOption(option =>
option
.setName("ign")
.setDescription("Player's name")
.setRequired(true),
),
async execute(interaction) {
await interaction.deferReply()
const ign = interaction.options.getString("ign")!
const uuid = await getUUID(ign) as string
const uuid = (await getUUID(ign)) as string
const formattedUuid = formatUuid(uuid)
const newIgn = await getIGN(uuid) as string
const newIgn = (await getIGN(uuid)) as string
const head = await getHeadURL(ign)
const embedColor = Number(color.replace("#", "0x"))
const footerText = interaction.guild ? interaction.guild.name : interaction.user.username
const footerIcon = interaction.guild ? interaction.guild.iconURL({ forceStatic: false }) : interaction.user.avatarURL({ forceStatic: false })
const footerText = interaction.guild
? interaction.guild.name
: interaction.user.username
const footerIcon = interaction.guild
? interaction.guild.iconURL({ forceStatic: false })
: interaction.user.avatarURL({ forceStatic: false })
if (!uuid) {
interaction.editReply({
embeds: [{
description: "That player doesn't exist!",
color: embedColor
}]
embeds: [
{
description: "That player doesn't exist!",
color: embedColor,
},
],
})
return
}
await interaction.editReply({
embeds: [{
title: newIgn,
description: "**UUID:** `" + uuid + "`\n" +
"**Formatted UUID:** `" + formattedUuid + "`",
color: embedColor,
thumbnail: {
url: head!
embeds: [
{
title: newIgn,
description:
"**UUID:** `" +
uuid +
"`\n" +
"**Formatted UUID:** `" +
formattedUuid +
"`",
color: embedColor,
thumbnail: {
url: head!,
},
footer: {
text: footerText + " | " + devMessage,
icon_url: footerIcon || undefined,
},
},
footer: {
text: footerText + " | " + devMessage,
icon_url: footerIcon || undefined
}
}]
],
})
}
} as Command
},
} as Command