Skip to content

Commit

Permalink
chore(genLog): use @naval-base/ms for conversion
Browse files Browse the repository at this point in the history
  • Loading branch information
JPBM135 committed Sep 17, 2024
1 parent d2114ec commit e5c3c29
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 26 deletions.
4 changes: 2 additions & 2 deletions apps/yuudachi/src/functions/logging/generateCaseLog.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { ms } from "@naval-base/ms";
import { logger, kSQL, container } from "@yuudachi/framework";
import { Client, type Snowflake, hyperlink, time, TimestampStyles, messageLink, channelLink } from "discord.js";
import i18next from "i18next";
import type { Sql } from "postgres";
import { caseActionLabel } from "../../util/actionKeys.js";
import { findClosestDuration } from "../../util/findClosestDuration.js";
import { type Case, CaseAction } from "../cases/createCase.js";
import { getGuildSetting, SettingsKeys } from "../settings/getGuildSetting.js";

Expand Down Expand Up @@ -40,7 +40,7 @@ export async function generateCaseLog(case_: Case, logChannelId: Snowflake, loca
const expirationDate = new Date(case_.actionExpiration);

msg += i18next.t("log.mod_log.case_log.duration", {
time: findClosestDuration(expirationDate.getTime() - Date.now()),
time: ms(expirationDate.getTime() - Date.now()),
timestamp: time(expirationDate, TimestampStyles.RelativeTime),
lng: locale,
});
Expand Down
24 changes: 0 additions & 24 deletions apps/yuudachi/src/util/findClosestDuration.ts

This file was deleted.

0 comments on commit e5c3c29

Please sign in to comment.