diff --git a/src/commands/Staff/punishment.ts b/src/commands/Staff/punishment.ts index 58a0d5b1692..f09997bba04 100644 --- a/src/commands/Staff/punishment.ts +++ b/src/commands/Staff/punishment.ts @@ -572,8 +572,8 @@ const command: Command = { punish.type === "VERBAL" ? new Date(punish.timestamp).setDate(new Date(punish.timestamp).getDate() + 1) : punish.type === "WARN" - ? new Date(punish.timestamp).setDate(new Date(punish.timestamp).getDate() + 7) - : new Date(punish.endTimestamp!).setDate(new Date(punish.endTimestamp!).getDate() + 30) + ? new Date(punish.timestamp).setDate(new Date(punish.timestamp).getDate() + 7) + : new Date(punish.endTimestamp!).setDate(new Date(punish.endTimestamp!).getDate() + 30) embed.addFields({ name: `Case ${punish.case}: ${ punish.endTimestamp ? (punish.duration ? `${punish.duration}${punish.type === "BAN" ? "d" : "h"} ` : "permanent ") : "" @@ -609,8 +609,8 @@ const command: Command = { punish.type === "VERBAL" ? new Date(punish.timestamp).setDate(new Date(punish.timestamp).getDate() + 1) : punish.type === "WARN" - ? new Date(punish.timestamp).setDate(new Date(punish.timestamp).getDate() + 7) - : new Date(punish.endTimestamp!).setDate(new Date(punish.endTimestamp!).getDate() + 30) + ? new Date(punish.timestamp).setDate(new Date(punish.timestamp).getDate() + 7) + : new Date(punish.endTimestamp!).setDate(new Date(punish.endTimestamp!).getDate() + 30) embed.addFields({ name: `Case ${punish.case}: ${ punish.endTimestamp ? (punish.duration ? `${punish.duration}${punish.type === "BAN" ? "d" : "h"} ` : "permanent ") : "" @@ -647,8 +647,8 @@ const command: Command = { punish.type === "VERBAL" ? new Date(punish.timestamp).setDate(new Date(punish.timestamp).getDate() + 1) : punish.type === "WARN" - ? new Date(punish.timestamp).setDate(new Date(punish.timestamp).getDate() + 7) - : new Date(punish.endTimestamp!).setDate(new Date(punish.endTimestamp!).getDate() + 30) + ? new Date(punish.timestamp).setDate(new Date(punish.timestamp).getDate() + 7) + : new Date(punish.endTimestamp!).setDate(new Date(punish.endTimestamp!).getDate() + 30) confirmEmbed.addFields({ name: `Case ${punish.case}: ${ punish.endTimestamp ? (punish.duration ? `${punish.duration}${punish.type === "BAN" ? "d" : "h"} ` : "permanent ") : "" diff --git a/src/lib/crowdinverify.ts b/src/lib/crowdinverify.ts index f94b0b0d5e2..0f7cbf77a95 100644 --- a/src/lib/crowdinverify.ts +++ b/src/lib/crowdinverify.ts @@ -283,8 +283,8 @@ export async function crowdinVerify(member: GuildMember, url?: string | null, se const highestRole = ["owner", "manager"].includes(project.user_role) ? "Manager" : project.contributed_languages?.some(l => l.user_role.name === "Proofreader") - ? "Proofreader" - : "Translator", + ? "Proofreader" + : "Translator", projectHighestHole = member.guild.roles.cache.find(r => r.name === `${projectName} ${highestRole}`) if (projectHighestHole) allProjectRoles.push(projectHighestHole) else console.error(`Couldn't find the ${highestRole} role for the ${projectName} project`) @@ -336,10 +336,10 @@ export async function crowdinVerify(member: GuildMember, url?: string | null, se ? // Place veteran roles at the end b.name.localeCompare(a.name) : !isProjectRole(a) && !isProjectRole(b) - ? // Sort language roles be their position - b.position - a.position - : // Place Hypixel project roles first - a.color - b.color + ? // Sort language roles be their position + b.position - a.position + : // Place Hypixel project roles first + a.color - b.color )) { const project = isProjectRole(role) ? (role.name.split(" ")[0] as ValidProjects) : "Hypixel" rolesPerProject[project] ??= [] diff --git a/src/lib/util.ts b/src/lib/util.ts index 6ba77cb4e05..a440fcd7419 100644 --- a/src/lib/util.ts +++ b/src/lib/util.ts @@ -147,8 +147,8 @@ export function createModlogEmbed(embedData: EmbedData, modlog: PunishmentLog, m modlog.type === "VERBAL" ? new Date(modlog.timestamp).setDate(new Date(modlog.timestamp).getDate() + 1) : modlog.type === "WARN" - ? new Date(modlog.timestamp).setDate(new Date(modlog.timestamp).getDate() + 7) - : new Date(modlog.endTimestamp ?? modlog.timestamp).setDate(new Date(modlog.endTimestamp ?? modlog.timestamp).getDate() + 30) + ? new Date(modlog.timestamp).setDate(new Date(modlog.timestamp).getDate() + 7) + : new Date(modlog.endTimestamp ?? modlog.timestamp).setDate(new Date(modlog.endTimestamp ?? modlog.timestamp).getDate() + 30) if (typeof modlog.duration === "number") { embedData.fields = [ { name: "Moderator", value: `<@!${modlog.moderator}>`, inline: true },