add event listeners on process in client
parent
fae3eab310
commit
aaeb35719f
|
@ -40,10 +40,17 @@ export default class Client extends Eris.Client {
|
|||
displayTimestamp: true,
|
||||
displayFilename: true,
|
||||
});
|
||||
this.events();
|
||||
this.loadFunctions();
|
||||
this.init();
|
||||
}
|
||||
|
||||
private async events() {
|
||||
process.on('unhandledRejection', (error) => {
|
||||
this.signale.error(error);
|
||||
});
|
||||
}
|
||||
|
||||
private async loadFunctions() {
|
||||
const functions = await fs.readdir('./functions');
|
||||
functions.forEach(async (func) => {
|
||||
|
|
Loading…
Reference in New Issue