Docker workaround
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user