From 44ee84d8f70d6f4720758b301361a8c818ccd8fb Mon Sep 17 00:00:00 2001 From: Isaac Date: Sun, 4 Sep 2022 21:20:24 +0100 Subject: [PATCH] Added more logging --- src/listeners/autocomplete/componentLoad.js | 16 ++++++++++++++++ src/listeners/buttons/componentLoad.js | 16 ++++++++++++++++ src/listeners/menus/componentLoad.js | 16 ++++++++++++++++ src/listeners/modals/componentLoad.js | 16 ++++++++++++++++ 4 files changed, 64 insertions(+) create mode 100644 src/listeners/autocomplete/componentLoad.js create mode 100644 src/listeners/buttons/componentLoad.js create mode 100644 src/listeners/menus/componentLoad.js create mode 100644 src/listeners/modals/componentLoad.js diff --git a/src/listeners/autocomplete/componentLoad.js b/src/listeners/autocomplete/componentLoad.js new file mode 100644 index 0000000..26e81b0 --- /dev/null +++ b/src/listeners/autocomplete/componentLoad.js @@ -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; + } +}; diff --git a/src/listeners/buttons/componentLoad.js b/src/listeners/buttons/componentLoad.js new file mode 100644 index 0000000..246948d --- /dev/null +++ b/src/listeners/buttons/componentLoad.js @@ -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; + } +}; diff --git a/src/listeners/menus/componentLoad.js b/src/listeners/menus/componentLoad.js new file mode 100644 index 0000000..03290de --- /dev/null +++ b/src/listeners/menus/componentLoad.js @@ -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; + } +}; diff --git a/src/listeners/modals/componentLoad.js b/src/listeners/modals/componentLoad.js new file mode 100644 index 0000000..a9454e2 --- /dev/null +++ b/src/listeners/modals/componentLoad.js @@ -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; + } +};