🥅 now also catches Typeerrors
This commit is contained in:
parent
5ffb65d9d9
commit
4ec45ed190
1 changed files with 2 additions and 7 deletions
|
@ -15,19 +15,14 @@ export default async (client: Client) => {
|
||||||
plugins.map(async (pluginName) => {
|
plugins.map(async (pluginName) => {
|
||||||
const plugin = await import(`../plugins/${pluginName}`);
|
const plugin = await import(`../plugins/${pluginName}`);
|
||||||
|
|
||||||
await client?.commands?.set(
|
await client.commands.set(plugin.default.data.name, plugin.default);
|
||||||
plugin?.default?.data?.name,
|
|
||||||
plugin?.default
|
|
||||||
);
|
|
||||||
|
|
||||||
logger.verbose(`Loaded plugin: ${pluginName}`);
|
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
.then(async () => {
|
.then(async () => {
|
||||||
logger.debug("Successfully loaded plugins.");
|
logger.debug("Successfully loaded plugins.");
|
||||||
})
|
})
|
||||||
.catch(async (err) => {
|
.catch(async (err) => {
|
||||||
logger.error(err);
|
logger.error(`${err}`);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Reference in a new issue