@hyperneutrino/djs-lite 1.2.1 → 1.2.2
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 +2 -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
|
|
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>>();
|
|
@@ -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
|
|
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
|
|