@hyperneutrino/djs-lite 1.2.2 → 1.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.ts +3 -1
- package/package.json +1 -1
package/index.ts
CHANGED
|
@@ -96,6 +96,8 @@ export async function loadCommands(client: Client<true>, directory: string, guil
|
|
|
96
96
|
|
|
97
97
|
await Promise.all(
|
|
98
98
|
files.map(async (file) => {
|
|
99
|
+
if (file.isDirectory()) return;
|
|
100
|
+
|
|
99
101
|
const absolutePath = path.resolve(file.parentPath, file.name);
|
|
100
102
|
|
|
101
103
|
const { default: item } = await import(absolutePath);
|
|
@@ -151,7 +153,7 @@ export async function loadInteractions(client: Client, directory: string, argume
|
|
|
151
153
|
|
|
152
154
|
const absolutePath = path.resolve(file.parentPath, file.name);
|
|
153
155
|
const relativePath = path.relative(path.resolve(directory), absolutePath);
|
|
154
|
-
const handlerKey = relativePath.replace(/\.[^/.]+$/, "");
|
|
156
|
+
const handlerKey = relativePath.replace(/\.[^/.]+$/, "").replace(/\\/g, "/");
|
|
155
157
|
|
|
156
158
|
const { default: item } = await import(absolutePath).catch(() => null);
|
|
157
159
|
|