@hyperneutrino/djs-lite 1.2.1 → 1.2.3

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.
Files changed (2) hide show
  1. package/index.ts +3 -3
  2. package/package.json +1 -1
package/index.ts CHANGED
@@ -134,7 +134,7 @@ export async function loadCommands(client: Client<true>, directory: string, guil
134
134
  }
135
135
  }
136
136
 
137
- export async function loadInteractions(client: Client<true>, directory: string, argumentSeparator: string = ":") {
137
+ export async function loadInteractions(client: Client, directory: string, argumentSeparator: string = ":") {
138
138
  const files = await fs.readdir(path.resolve(directory), { recursive: true, withFileTypes: true });
139
139
 
140
140
  const modalHandlers = new Map<string, Handler<ModalSubmitInteraction>>();
@@ -151,7 +151,7 @@ export async function loadInteractions(client: Client<true>, directory: string,
151
151
 
152
152
  const absolutePath = path.resolve(file.parentPath, file.name);
153
153
  const relativePath = path.relative(path.resolve(directory), absolutePath);
154
- const handlerKey = relativePath.replace(/\.[^/.]+$/, "");
154
+ const handlerKey = relativePath.replace(/\.[^/.]+$/, "").replace(/\\/g, "/");
155
155
 
156
156
  const { default: item } = await import(absolutePath).catch(() => null);
157
157
 
@@ -182,7 +182,7 @@ export async function loadInteractions(client: Client<true>, directory: string,
182
182
  });
183
183
  }
184
184
 
185
- export async function loadEvents(client: Client<true>, directory: string, recursive: boolean = false) {
185
+ export async function loadEvents(client: Client, directory: string, recursive: boolean = false) {
186
186
  const files = await fs.readdir(path.resolve(directory), { recursive, withFileTypes: true });
187
187
  const handlers: Partial<{ [K in keyof ClientEvents]: ((...args: ClientEvents[K]) => unknown)[] }> = {};
188
188
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@hyperneutrino/djs-lite",
3
3
  "private": false,
4
- "version": "1.2.1",
4
+ "version": "1.2.3",
5
5
  "module": "index.ts",
6
6
  "type": "module",
7
7
  "devDependencies": {