Idk why this was an async function

This commit is contained in:
2024-10-16 11:08:09 +02:00
parent 523f8115e7
commit 8eac52d592
15 changed files with 15 additions and 15 deletions

View File

@@ -51,7 +51,7 @@ export default {
}) })
const ign = (await getIGN(verifyData.uuid)) as string const ign = (await getIGN(verifyData.uuid)) as string
const head = await getHeadURL(ign) const head = getHeadURL(ign)
await interaction.editReply({ await interaction.editReply({
embeds: [{ embeds: [{

View File

@@ -53,7 +53,7 @@ export default {
}] }]
}) })
const head = await getHeadURL(ign) const head = getHeadURL(ign)
const player = await getPlayer(uuid) const player = await getPlayer(uuid)
if (!player) { if (!player) {
interaction.editReply({ interaction.editReply({

View File

@@ -61,7 +61,7 @@ export default {
return return
} }
const head = await getHeadURL(ign) const head = getHeadURL(ign)
const formattedIgn = await getIGN(uuid) const formattedIgn = await getIGN(uuid)
await interaction.editReply({ await interaction.editReply({
embeds: [{ embeds: [{

View File

@@ -58,7 +58,7 @@ export default {
}) })
const ign = (await getIGN(verifyData.uuid)) as string const ign = (await getIGN(verifyData.uuid)) as string
const head = await getHeadURL(ign) const head = getHeadURL(ign)
await interaction.editReply({ await interaction.editReply({
embeds: [{ embeds: [{

View File

@@ -111,7 +111,7 @@ export default {
responseGuildID = guild._id responseGuildID = guild._id
} }
const head = await getHeadURL(ign) const head = getHeadURL(ign)
if (responseGuildID === hypixelGuildID) { if (responseGuildID === hypixelGuildID) {
const GuildMembers = guild!.members const GuildMembers = guild!.members
const guildRank = GuildMembers.find(member => member.uuid === player.uuid)!.rank const guildRank = GuildMembers.find(member => member.uuid === player.uuid)!.rank

View File

@@ -32,7 +32,7 @@ export default async function guildMember(interaction: ChatInputCommandInteracti
}] }]
}) })
const head = await getHeadURL(ign) const head = getHeadURL(ign)
const player = await getPlayer(uuid) const player = await getPlayer(uuid)
if (!player) { if (!player) {
await interaction.editReply({ await interaction.editReply({

View File

@@ -38,7 +38,7 @@ export default async function beast(interaction: ChatInputCommandInteraction): P
}] }]
}) })
const head = await getHeadURL(ign) const head = getHeadURL(ign)
const player = await getPlayer(uuid) const player = await getPlayer(uuid)
if (!player) { if (!player) {
interaction.editReply({ interaction.editReply({

View File

@@ -58,7 +58,7 @@ export default {
} }
const ign = (await getIGN(verifyData.uuid)) as string const ign = (await getIGN(verifyData.uuid)) as string
const head = await getHeadURL(ign) const head = getHeadURL(ign)
if (guildID !== hypixelGuildID) { if (guildID !== hypixelGuildID) {
const roles = roleManage("default") const roles = roleManage("default")
await user.roles.remove(roles.rolesToRemove, "User used the update command") await user.roles.remove(roles.rolesToRemove, "User used the update command")

View File

@@ -40,7 +40,7 @@ export default {
const formattedUuid = formatUuid(uuid) const formattedUuid = formatUuid(uuid)
const newIgn = await getIGN(uuid) as string const newIgn = await getIGN(uuid) as string
const head = await getHeadURL(ign) const head = getHeadURL(ign)
await interaction.editReply({ await interaction.editReply({
embeds: [{ embeds: [{

View File

@@ -76,7 +76,7 @@ export default {
}] }]
}) })
const head = await getHeadURL(ign) const head = getHeadURL(ign)
const player = (await getPlayer(uuid)) as IPlayerData const player = (await getPlayer(uuid)) as IPlayerData
if (!player) { if (!player) {
interaction.editReply({ interaction.editReply({

View File

@@ -34,7 +34,7 @@ export default {
} }
const ign = await getIGN(verifyData.uuid) const ign = await getIGN(verifyData.uuid)
const head = await getHeadURL(ign!) const head = getHeadURL(ign!)
await interaction.editReply({ await interaction.editReply({
embeds: [{ embeds: [{

View File

@@ -40,7 +40,7 @@ export default {
} }
const ign = (await getIGN(verifiedUser.uuid)) as string const ign = (await getIGN(verifiedUser.uuid)) as string
const head = await getHeadURL(ign) const head = getHeadURL(ign)
await interaction.editReply({ await interaction.editReply({
embeds: [{ embeds: [{

View File

@@ -31,7 +31,7 @@ export default {
} }
const ign = player?.playername || "" const ign = player?.playername || ""
const head = await getHeadURL(ign) const head = getHeadURL(ign)
const rank2 = player.newPackageRank const rank2 = player.newPackageRank
const monthlyRank = player.monthlyPackageRank const monthlyRank = player.monthlyPackageRank

View File

@@ -48,7 +48,7 @@ export default {
}] }]
}) })
const head = await getHeadURL(ign) const head = getHeadURL(ign)
const player = await getPlayer(uuid) const player = await getPlayer(uuid)
if (!player) { if (!player) {
interaction.editReply({ interaction.editReply({

View File

@@ -85,7 +85,7 @@ async function getGuild(query: string, reqType: GuildQueryType = "player"): Prom
} }
} }
async function getHeadURL(ign: string): Promise<string | null> { function getHeadURL(ign: string): string {
return minotar + ign return minotar + ign
} }