forked from engineering/cloudservices
Stop function loader from erroring
parent
cff8402f7d
commit
1dc0ee955b
|
@ -54,7 +54,7 @@ export default class Client extends Eris.Client {
|
||||||
private async loadFunctions() {
|
private async loadFunctions() {
|
||||||
const functions = await fs.readdir('./functions');
|
const functions = await fs.readdir('./functions');
|
||||||
functions.forEach(async (func) => {
|
functions.forEach(async (func) => {
|
||||||
if (func === 'index.ts') return;
|
if (func === 'index.ts' || func === 'index.js') return;
|
||||||
try {
|
try {
|
||||||
(require(`./functions/${func}`).default)(this);
|
(require(`./functions/${func}`).default)(this);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|
Loading…
Reference in New Issue