refactor: update import statements to use .js extensions

- Changed all import statements across the project to include the .js extension for consistency and to comply with ES module standards.
- Updated imports in various files including bootstrap.ts, shutdown.ts, config.ts, and many others.
- Ensured that all related modules and types are correctly imported with the new extension.
This commit is contained in:
Asep Haryana Saputra
2026-05-21 12:03:31 +00:00
parent 4cd92303ef
commit 0ef6fc8d31
56 changed files with 208 additions and 193 deletions
+1 -1
View File
@@ -1,5 +1,5 @@
import { EndBehaviorType, type VoiceReceiver } from "@discordjs/voice";
import { config } from "../config";
import { config } from "../config.js";
export interface AudioStreamHandlers {
onPacket: (chunk: Buffer) => void;
+1 -1
View File
@@ -1,6 +1,6 @@
import { createRequire } from "node:module";
import * as prism from "prism-media";
import { config } from "../config";
import { config } from "../config.js";
const require = createRequire(import.meta.url);
+2 -2
View File
@@ -1,7 +1,7 @@
import path from "node:path";
import type { Client, VoiceChannel } from "discord.js-selfbot-v13";
import { config } from "../config";
import type { SegmentMetadata, SegmentState, UserMetadata } from "../types";
import { config } from "../config.js";
import type { SegmentMetadata, SegmentState, UserMetadata } from "../types.js";
export async function collectUserMetadata(
client: Client,
+1 -1
View File
@@ -1,7 +1,7 @@
import fs from "node:fs";
import path from "node:path";
import * as prism from "prism-media";
import type { SegmentState } from "../types";
import type { SegmentState } from "../types.js";
export function buildSegmentPaths(
userDir: string,
+2 -2
View File
@@ -3,8 +3,8 @@ import path from "node:path";
import {
buildMuxFfmpegArgs,
runFfmpeg as defaultRunFfmpeg,
} from "../audio/ffmpegProcess";
import type { UserMetadata } from "../types";
} from "../audio/ffmpegProcess.js";
import type { UserMetadata } from "../types.js";
export type SessionRecordingStatus =
| "pending"
+4 -4
View File
@@ -1,13 +1,13 @@
import fs from "node:fs";
import path from "node:path";
import { config } from "../config";
import { config } from "../config.js";
import {
insertVoiceRecording,
updateVoiceRecordingAsFailed,
updateVoiceRecordingAsUploaded,
} from "../database/voiceRecordingRepo";
import { createChildLogger } from "../logger";
import { uploadToTele } from "../uploader/teleUpload";
} from "../database/voiceRecordingRepo.js";
import { createChildLogger } from "../logger.js";
import { uploadToTele } from "../uploader/teleUpload.js";
const logger = createChildLogger("recording-uploader");