thaldrin/src/utils/command.amount.ts

5 lines
298 B
TypeScript
Raw Normal View History

2021-05-06 20:14:34 +00:00
import path from "path"
import { readdirSync as read } from "fs"
2021-09-11 11:38:36 +00:00
2021-05-06 20:14:34 +00:00
export async function Folders() { return await read(path.join(__dirname, '../modules')) }
2021-09-11 11:38:36 +00:00
export async function Commands(module: string, Thaldrin: any) { return Thaldrin.commands.filter((command: any) => command.module === module) }