Docker workaround

This commit is contained in:
2025-08-10 21:24:25 +02:00
parent b4f0a2c8dc
commit 62b7750a0a
11 changed files with 37 additions and 30 deletions

View File

@@ -2,14 +2,14 @@ import { Events, MessageFlags } from "discord.js"
import fs from "fs"
import path from "path"
import { embedColor } from "~/config/options"
import { IModal } from "~/typings"
import { IModal, LoadEventsOptions } from "~/typings"
import { ExtendedClient as Client } from "~/utils/Client"
import logToChannel from "~/utils/Functions/logtochannel"
import tryCatch from "../Functions/trycatch"
import { log } from "../Logger"
export default async function loadModalEvents(client: Client, ft: "ts" | "js", folder: "src" | "dist") {
const modalPath = path.join(process.cwd(), folder, "components", "modals")
export default async function loadModalEvents(client: Client, { ft, dir }: LoadEventsOptions) {
const modalPath = path.join(process.cwd(), dir, "components", "modals")
const modalFiles = fs.readdirSync(modalPath).filter(file => file.endsWith(`.${ft}`))
for (const file of modalFiles) {