Skip to content
This repository has been archived by the owner on Nov 22, 2023. It is now read-only.

Commit

Permalink
style: format with prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
ImRodry committed Nov 22, 2023
1 parent aab3194 commit 8e415ea
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 14 deletions.
12 changes: 6 additions & 6 deletions src/commands/Staff/punishment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 ") : ""
Expand Down Expand Up @@ -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 ") : ""
Expand Down Expand Up @@ -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 ") : ""
Expand Down
12 changes: 6 additions & 6 deletions src/lib/crowdinverify.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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`)
Expand Down Expand Up @@ -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] ??= []
Expand Down
4 changes: 2 additions & 2 deletions src/lib/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 },
Expand Down

0 comments on commit 8e415ea

Please sign in to comment.