···55 SlashCommandBuilder,
66} from "discord.js";
77import type { customClient } from "../..";
88-import { createDong } from "../../lib/dong-io";
99-import { download } from "../../lib/download";
88+import { createDong } from "../../lib/dong-io.ts";
99+import { download } from "../../lib/download.ts";
10101111export const data = new SlashCommandBuilder()
1212 .setName("create")
+2-2
src/commands/dong/open.ts
···55 SlashCommandBuilder,
66} from "discord.js";
77import type { customClient } from "../..";
88-import { download } from "../../lib/download";
99-import { readDong } from "../../lib/dong-io";
88+import { download } from "../../lib/download.ts";
99+import { readDong } from "../../lib/dong-io.ts";
1010import { Mime } from "mime";
1111import standardTypes from "mime/types/standard.js";
1212import otherTypes from "mime/types/other.js";
+11-4
src/index.ts
···77 MessageFlags,
88 type Interaction,
99} from "discord.js";
1010-import { Glob } from "bun";
1010+// import { Glob } from "bun";
1111+import { glob } from "glob";
1212+import "dotenv/config";
1313+import path from "node:path";
11141215const token = process.env.token;
1316if (!token) throw new Error("Token required. Please fill in TOKEN in .env");
1417console.log("Token Valid!");
1818+1919+const __dirname = import.meta.dirname;
15201621// client typing
1722export type customClient = Client & {
···34393540// setup commands
3641client.commands = new Collection();
3737-const commandGlob = new Glob("**/*.ts");
3838-for await (const file of commandGlob.scan("./src/commands")) {
3939- const command = await import("./commands/" + file);
4242+// const commandGlob = new Glob("**/*.ts");
4343+for (const file of await glob("src/commands/**/*.ts", {
4444+ ignore: "node_modules",
4545+})) {
4646+ const command = await import("file:///" + path.join(__dirname, "..", file));
4047 // check command contains all required properties
4148 if (
4249 "data" in command &&