@hyperneutrino/djs-lite 1.4.5 → 1.4.6

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 +4 -1
  2. package/package.json +1 -1
package/index.ts CHANGED
@@ -249,7 +249,10 @@ export async function loadInteractions(client: Client, directory: string, argume
249
249
  const channelSelectHandlers = new Map<string, Handler<ChannelSelectMenuInteraction>>();
250
250
 
251
251
  await importAll({ directory, recursive: true }, async ({ relativePath, item }) => {
252
- const handlerKey = relativePath.replace(/\.[^/.]+$/, "").replace(/\\/g, "/");
252
+ const handlerKey = path
253
+ .relative(directory, relativePath)
254
+ .replace(/\.[^/.]+$/, "")
255
+ .replace(/\\/g, "/");
253
256
 
254
257
  if (item instanceof ModalHandler) modalHandlers.set(handlerKey, item.handler);
255
258
  else if (item instanceof ButtonHandler) buttonHandlers.set(handlerKey, item.handler);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@hyperneutrino/djs-lite",
3
3
  "private": false,
4
- "version": "1.4.5",
4
+ "version": "1.4.6",
5
5
  "module": "index.ts",
6
6
  "type": "module",
7
7
  "devDependencies": {