fix: gatherCommands now accept ts and js extensions

This commit is contained in:
HerozDotExe 2025-06-19 12:49:05 +02:00
parent dde61e8e7e
commit 3c04b034f9

View file

@ -8,10 +8,8 @@ export async function gatherCommandsPaths(): Promise<string[]> {
for await (const entry of commandsRoot) {
if (entry.isDirectory) {
const commandsFolderPath = path.join(foldersPath, entry.name);
const commandsFiles = (
await Array.fromAsync(Deno.readDir(commandsFolderPath))
).filter((file) => file.name.endsWith(".js"));
for (const file of commandsFiles) {
const commandsFiles = Deno.readDir(commandsFolderPath)
for await (const file of commandsFiles) {
const commandPath = path.join(commandsFolderPath, file.name);
commandsPath.push(commandPath);