Added more logging

This commit is contained in:
Isaac 2022-09-04 21:20:24 +01:00
parent bae6af96f7
commit 44ee84d8f7
No known key found for this signature in database
GPG Key ID: 0DE40AE37BBA5C33
4 changed files with 64 additions and 0 deletions

View File

@ -0,0 +1,16 @@
const { Listener } = require('@eartharoid/dbf');
module.exports = class extends Listener {
constructor(client, options) {
super(client, {
...options,
emitter: client.autocomplete,
event: 'componentLoad',
});
}
run(autocompleter) {
this.client.log.info(`Loaded "${autocompleter.id}" autocompleter`);
return true;
}
};

View File

@ -0,0 +1,16 @@
const { Listener } = require('@eartharoid/dbf');
module.exports = class extends Listener {
constructor(client, options) {
super(client, {
...options,
emitter: client.buttons,
event: 'componentLoad',
});
}
run(button) {
this.client.log.info(`Loaded "${button.id}" button`);
return true;
}
};

View File

@ -0,0 +1,16 @@
const { Listener } = require('@eartharoid/dbf');
module.exports = class extends Listener {
constructor(client, options) {
super(client, {
...options,
emitter: client.menus,
event: 'componentLoad',
});
}
run(menu) {
this.client.log.info(`Loaded "${menu.id}" menu`);
return true;
}
};

View File

@ -0,0 +1,16 @@
const { Listener } = require('@eartharoid/dbf');
module.exports = class extends Listener {
constructor(client, options) {
super(client, {
...options,
emitter: client.modals,
event: 'componentLoad',
});
}
run(modal) {
this.client.log.info(`Loaded "${modal.id}" modal`);
return true;
}
};