1
0
Fork 0

move bindings

refactor/models
Matthew 2019-11-09 23:14:02 -05:00
parent cbeb964b21
commit d7a19e1b4e
No known key found for this signature in database
GPG Key ID: 766BE43AE75F7559
1 changed files with 7 additions and 7 deletions

View File

@ -83,13 +83,6 @@ export default class Client extends Eris.Client {
} }
public async init() { public async init() {
const intervals = await fs.readdir('./intervals');
intervals.forEach((interval) => {
// eslint-disable-next-line
if (interval === 'index.js') return;
require(`./intervals/${interval}`).default(this);
this.signale.complete(`Loaded interval ${interval.split('.')[0]}`);
});
const evtFiles = await fs.readdir('./events/'); const evtFiles = await fs.readdir('./events/');
Object.values(commands).forEach((c: Function) => this.loadCommand(c)); Object.values(commands).forEach((c: Function) => this.loadCommand(c));
@ -108,6 +101,13 @@ export default class Client extends Eris.Client {
this.on('ready', () => { this.on('ready', () => {
this.signale.info(`Connected to Discord as ${this.user.username}#${this.user.discriminator}`); this.signale.info(`Connected to Discord as ${this.user.username}#${this.user.discriminator}`);
}); });
const intervals = await fs.readdir('./intervals');
intervals.forEach((interval) => {
// eslint-disable-next-line
if (interval === 'index.js') return;
require(`./intervals/${interval}`).default(this);
this.signale.complete(`Loaded interval ${interval.split('.')[0]}`);
});
} }
} }