fix: gatherCommands now accept ts and js extensions
This commit is contained in:
parent
dde61e8e7e
commit
3c04b034f9
1 changed files with 2 additions and 4 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue