@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.
- package/index.ts +4 -1
- 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 =
|
|
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);
|