zumito-framework 1.4.0 → 1.4.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.
|
@@ -61,7 +61,7 @@ export class Module {
|
|
|
61
61
|
throw new Error(`Folder ${folder} doesn't exist`);
|
|
62
62
|
const files = fs.readdirSync(folderPath);
|
|
63
63
|
for (const file of files) {
|
|
64
|
-
if (file.endsWith('d.ts'))
|
|
64
|
+
if (file.endsWith('.d.ts'))
|
|
65
65
|
continue;
|
|
66
66
|
if (file.endsWith('.js') || file.endsWith('.ts')) {
|
|
67
67
|
let event = await import('file://' + path.join(folderPath, file)).catch((e) => {
|
|
@@ -115,7 +115,7 @@ export class Module {
|
|
|
115
115
|
return;
|
|
116
116
|
const files = fs.readdirSync(path.join(this.path, 'models'));
|
|
117
117
|
for (const file of files) {
|
|
118
|
-
if (file.endsWith('d.ts'))
|
|
118
|
+
if (file.endsWith('.d.ts'))
|
|
119
119
|
continue;
|
|
120
120
|
if (file.endsWith('.ts') || file.endsWith('.js')) {
|
|
121
121
|
let model = await import('file://' + `${this.path}/models/${file}`).catch((e) => {
|
|
@@ -143,7 +143,7 @@ export class Module {
|
|
|
143
143
|
throw new Error(`Folder ${folder} doesn't exist`);
|
|
144
144
|
const files = fs.readdirSync(folderPath);
|
|
145
145
|
for (const file of files) {
|
|
146
|
-
if (file.endsWith('d.ts'))
|
|
146
|
+
if (file.endsWith('.d.ts'))
|
|
147
147
|
continue;
|
|
148
148
|
if (file.endsWith('.js') || file.endsWith('.ts')) {
|
|
149
149
|
let route = await import('file://' + path.join(folderPath, file)).catch((e) => {
|
package/dist/index.d.ts
CHANGED
|
@@ -30,7 +30,7 @@ import { Route, RouteMethod } from './definitions/Route.js';
|
|
|
30
30
|
import { InteractionHandler } from './services/handlers/InteractionHandler.js';
|
|
31
31
|
import { CommandManager } from './services/managers/CommandManager.js';
|
|
32
32
|
import { ErrorType } from './definitions/ErrorType.js';
|
|
33
|
-
import { InviteUrlGenerator } from '
|
|
33
|
+
import { InviteUrlGenerator } from './services/utilities/InviteUrlGenerator.js';
|
|
34
34
|
export { ModalSubmitParameters } from './definitions/parameters/ModalSubmitParameters.js';
|
|
35
35
|
export { CommandBinds } from './definitions/commands/CommandBinds.js';
|
|
36
36
|
export { Injectable } from './definitions/decorators/Injectable.decorator.js';
|
package/dist/index.js
CHANGED
|
@@ -23,7 +23,7 @@ import { Route, RouteMethod } from './definitions/Route.js';
|
|
|
23
23
|
import { InteractionHandler } from './services/handlers/InteractionHandler.js';
|
|
24
24
|
import { CommandManager } from './services/managers/CommandManager.js';
|
|
25
25
|
import { ErrorType } from './definitions/ErrorType.js';
|
|
26
|
-
import { InviteUrlGenerator } from '
|
|
26
|
+
import { InviteUrlGenerator } from './services/utilities/InviteUrlGenerator.js';
|
|
27
27
|
export { Injectable } from './definitions/decorators/Injectable.decorator.js';
|
|
28
28
|
ServiceContainer.addService(TextFormatter, []);
|
|
29
29
|
ServiceContainer.addService(EmojiFallback, [discord.Client.name, TranslationManager.name]);
|
|
@@ -79,7 +79,7 @@ export class CommandManager {
|
|
|
79
79
|
async loadCommandsFolder(folderPath, options) {
|
|
80
80
|
const files = fs.readdirSync(folderPath);
|
|
81
81
|
for (const file of files) {
|
|
82
|
-
if (file.endsWith('d.ts'))
|
|
82
|
+
if (file.endsWith('.d.ts'))
|
|
83
83
|
continue;
|
|
84
84
|
if (file.endsWith('.js') || file.endsWith('.ts')) {
|
|
85
85
|
const command = await this.loadCommandFile(path.join(folderPath, file));
|