mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-19 17:38:19 +08:00
core: load ts files only
This commit is contained in:
2 files changed
+2
-2
No files matched your search
@@ -56,7 +56,7 @@ export async function apply(ctx: Context) {
|
||||
|
||||
const handlerDir = path.resolve(__dirname, '..', 'handler');
|
||||
const handlers = await fs.readdir(handlerDir);
|
||||
for (const h of handlers) {
|
||||
for (const h of handlers.filter((i) => i.endsWith('.ts'))) {
|
||||
ctx.loader.reloadPlugin(ctx, path.resolve(handlerDir, h), {}, `hydrooj/handler/${h.split('.')[0]}`);
|
||||
}
|
||||
await handler(pending, fail, ctx);
|
||||
|
||||
Reference in new issue
Block a user