From 5b6349a5a300808821b021cbcf35f70c90985c27 Mon Sep 17 00:00:00 2001 From: XEfnexX <61552510+XEfnexX@users.noreply.github.com> Date: Sat, 4 Jun 2022 21:12:59 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A8=20Build=20v2.0.0-04.06.22-05?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/Badges.html | 2 +- docs/BaseComponent.html | 2 +- docs/BaseInteraction.html | 2 +- docs/BaseTicket.html | 2 +- docs/BaseTicketManager.html | 2 +- docs/ButtonInteraction.html | 2 +- docs/ButtonInteractionManager.html | 2 +- docs/Colors.html | 2 +- docs/ContextInteraction.html | 2 +- docs/ContextInteractionManager.html | 2 +- docs/DisGroupDevError.html | 2 +- docs/Emojis.html | 2 +- docs/Event.html | 2 +- docs/EventManager.html | 2 +- docs/InteractionManager.html | 2 +- docs/Logger.html | 2 +- docs/ModalInteraction.html | 2 +- docs/ModalInteractionManager.html | 2 +- docs/Partner.html | 2 +- docs/SelectMenuInteraction.html | 2 +- docs/SelectMenuInteractionManager.html | 2 +- docs/SlashCommand.html | 2 +- docs/SlashCommandInteractionManager.html | 2 +- docs/StatusPageChecker.html | 2 +- docs/TextTicket.html | 2 +- docs/TextTicketManager.html | 2 +- docs/TranslationManager.html | 2 +- docs/Utilities.html | 2 +- docs/errors_DisGroupDevError.js.html | 2 +- docs/global.html | 2 +- docs/index.html | 2 +- docs/managers_BaseTicketManager.js.html | 2 +- docs/managers_EventManager.js.html | 4 +-- docs/managers_InteractionManager.js.html | 2 +- docs/managers_StatusPageChecker.js.html | 2 +- docs/managers_TextTicketManager.js.html | 2 +- docs/managers_TranslationManager.js.html | 2 +- ...teraction_ButtonInteractionManager.js.html | 10 +++---- ...eraction_ContextInteractionManager.js.html | 10 +++---- ...nteraction_ModalInteractionManager.js.html | 10 +++---- ...ction_SelectMenuInteractionManager.js.html | 10 +++---- ...ion_SlashCommandInteractionManager.js.html | 12 ++++----- docs/structures_BaseTicket.js.html | 2 +- docs/structures_Event.js.html | 2 +- docs/structures_TextTicket.js.html | 2 +- ...ructures_interaction_BaseComponent.js.html | 2 +- ...ctures_interaction_BaseInteraction.js.html | 2 +- ...ures_interaction_ButtonInteraction.js.html | 2 +- ...res_interaction_ContextInteraction.js.html | 2 +- ...tures_interaction_ModalInteraction.js.html | 2 +- ..._interaction_SelectMenuInteraction.js.html | 2 +- ...tructures_interaction_SlashCommand.js.html | 2 +- docs/utils_Badges.js.html | 2 +- docs/utils_Colors.js.html | 2 +- docs/utils_Emojis.js.html | 2 +- docs/utils_Logger.js.html | 2 +- docs/utils_Partner.js.html | 2 +- docs/utils_Utilities.js.html | 2 +- lib/managers/EventManager.js | 2 +- .../interaction/ButtonInteractionManager.js | 8 +++--- .../interaction/ContextInteractionManager.js | 8 +++--- .../interaction/ModalInteractionManager.js | 8 +++--- .../SelectMenuInteractionManager.js | 8 +++--- .../SlashCommandInteractionManager.js | 10 +++---- test/Interactions/Slash/General/Ping.js | 27 +++++++++++++++++++ test/loadInteractions.js | 19 +++++++++++++ 66 files changed, 148 insertions(+), 102 deletions(-) create mode 100644 test/Interactions/Slash/General/Ping.js diff --git a/docs/Badges.html b/docs/Badges.html index e5af0d8..a154d5e 100644 --- a/docs/Badges.html +++ b/docs/Badges.html @@ -83,7 +83,7 @@ diff --git a/docs/BaseComponent.html b/docs/BaseComponent.html index 3a1b6bd..df22035 100644 --- a/docs/BaseComponent.html +++ b/docs/BaseComponent.html @@ -83,7 +83,7 @@ diff --git a/docs/BaseInteraction.html b/docs/BaseInteraction.html index 59479d7..e9e73f5 100644 --- a/docs/BaseInteraction.html +++ b/docs/BaseInteraction.html @@ -83,7 +83,7 @@ diff --git a/docs/BaseTicket.html b/docs/BaseTicket.html index 9e5af93..da55b17 100644 --- a/docs/BaseTicket.html +++ b/docs/BaseTicket.html @@ -83,7 +83,7 @@ diff --git a/docs/BaseTicketManager.html b/docs/BaseTicketManager.html index e8a36aa..7a3adde 100644 --- a/docs/BaseTicketManager.html +++ b/docs/BaseTicketManager.html @@ -83,7 +83,7 @@ diff --git a/docs/ButtonInteraction.html b/docs/ButtonInteraction.html index 2edac8b..29ca4d3 100644 --- a/docs/ButtonInteraction.html +++ b/docs/ButtonInteraction.html @@ -83,7 +83,7 @@ diff --git a/docs/ButtonInteractionManager.html b/docs/ButtonInteractionManager.html index 3d10bf3..4f7bb28 100644 --- a/docs/ButtonInteractionManager.html +++ b/docs/ButtonInteractionManager.html @@ -83,7 +83,7 @@ diff --git a/docs/Colors.html b/docs/Colors.html index 9342e82..2988c36 100644 --- a/docs/Colors.html +++ b/docs/Colors.html @@ -83,7 +83,7 @@ diff --git a/docs/ContextInteraction.html b/docs/ContextInteraction.html index 5493527..3eef53f 100644 --- a/docs/ContextInteraction.html +++ b/docs/ContextInteraction.html @@ -83,7 +83,7 @@ diff --git a/docs/ContextInteractionManager.html b/docs/ContextInteractionManager.html index df7782b..a359418 100644 --- a/docs/ContextInteractionManager.html +++ b/docs/ContextInteractionManager.html @@ -83,7 +83,7 @@ diff --git a/docs/DisGroupDevError.html b/docs/DisGroupDevError.html index 0408d6a..8494304 100644 --- a/docs/DisGroupDevError.html +++ b/docs/DisGroupDevError.html @@ -83,7 +83,7 @@ diff --git a/docs/Emojis.html b/docs/Emojis.html index f66129d..2f715e1 100644 --- a/docs/Emojis.html +++ b/docs/Emojis.html @@ -83,7 +83,7 @@ diff --git a/docs/Event.html b/docs/Event.html index 7e94b7d..41547db 100644 --- a/docs/Event.html +++ b/docs/Event.html @@ -83,7 +83,7 @@ diff --git a/docs/EventManager.html b/docs/EventManager.html index 3a81cbe..adc946d 100644 --- a/docs/EventManager.html +++ b/docs/EventManager.html @@ -83,7 +83,7 @@ diff --git a/docs/InteractionManager.html b/docs/InteractionManager.html index 82e3bf1..dbb4568 100644 --- a/docs/InteractionManager.html +++ b/docs/InteractionManager.html @@ -83,7 +83,7 @@ diff --git a/docs/Logger.html b/docs/Logger.html index a8381a5..2cbf0c1 100644 --- a/docs/Logger.html +++ b/docs/Logger.html @@ -83,7 +83,7 @@ diff --git a/docs/ModalInteraction.html b/docs/ModalInteraction.html index dc9d3b9..93ae8b3 100644 --- a/docs/ModalInteraction.html +++ b/docs/ModalInteraction.html @@ -83,7 +83,7 @@ diff --git a/docs/ModalInteractionManager.html b/docs/ModalInteractionManager.html index f3b90bd..021bb12 100644 --- a/docs/ModalInteractionManager.html +++ b/docs/ModalInteractionManager.html @@ -83,7 +83,7 @@ diff --git a/docs/Partner.html b/docs/Partner.html index d397e77..1ea11c7 100644 --- a/docs/Partner.html +++ b/docs/Partner.html @@ -83,7 +83,7 @@ diff --git a/docs/SelectMenuInteraction.html b/docs/SelectMenuInteraction.html index 6aaca7e..ebd97f9 100644 --- a/docs/SelectMenuInteraction.html +++ b/docs/SelectMenuInteraction.html @@ -83,7 +83,7 @@ diff --git a/docs/SelectMenuInteractionManager.html b/docs/SelectMenuInteractionManager.html index 1ce57f1..9f008ee 100644 --- a/docs/SelectMenuInteractionManager.html +++ b/docs/SelectMenuInteractionManager.html @@ -83,7 +83,7 @@ diff --git a/docs/SlashCommand.html b/docs/SlashCommand.html index 0c6010f..0acf965 100644 --- a/docs/SlashCommand.html +++ b/docs/SlashCommand.html @@ -83,7 +83,7 @@ diff --git a/docs/SlashCommandInteractionManager.html b/docs/SlashCommandInteractionManager.html index caab247..0d66590 100644 --- a/docs/SlashCommandInteractionManager.html +++ b/docs/SlashCommandInteractionManager.html @@ -83,7 +83,7 @@ diff --git a/docs/StatusPageChecker.html b/docs/StatusPageChecker.html index a80039d..df7916f 100644 --- a/docs/StatusPageChecker.html +++ b/docs/StatusPageChecker.html @@ -83,7 +83,7 @@ diff --git a/docs/TextTicket.html b/docs/TextTicket.html index 17014e1..851ac1e 100644 --- a/docs/TextTicket.html +++ b/docs/TextTicket.html @@ -83,7 +83,7 @@ diff --git a/docs/TextTicketManager.html b/docs/TextTicketManager.html index cd6a2b1..a17acc1 100644 --- a/docs/TextTicketManager.html +++ b/docs/TextTicketManager.html @@ -83,7 +83,7 @@ diff --git a/docs/TranslationManager.html b/docs/TranslationManager.html index 6ba130f..ed06544 100644 --- a/docs/TranslationManager.html +++ b/docs/TranslationManager.html @@ -83,7 +83,7 @@ diff --git a/docs/Utilities.html b/docs/Utilities.html index 978f4d5..0fb186e 100644 --- a/docs/Utilities.html +++ b/docs/Utilities.html @@ -83,7 +83,7 @@ diff --git a/docs/errors_DisGroupDevError.js.html b/docs/errors_DisGroupDevError.js.html index 2889891..55e10b4 100644 --- a/docs/errors_DisGroupDevError.js.html +++ b/docs/errors_DisGroupDevError.js.html @@ -83,7 +83,7 @@ diff --git a/docs/global.html b/docs/global.html index aa065ea..a559fe1 100644 --- a/docs/global.html +++ b/docs/global.html @@ -83,7 +83,7 @@ diff --git a/docs/index.html b/docs/index.html index 91da33c..2b6adb9 100644 --- a/docs/index.html +++ b/docs/index.html @@ -83,7 +83,7 @@ diff --git a/docs/managers_BaseTicketManager.js.html b/docs/managers_BaseTicketManager.js.html index 6e4b22e..38fb139 100644 --- a/docs/managers_BaseTicketManager.js.html +++ b/docs/managers_BaseTicketManager.js.html @@ -83,7 +83,7 @@ diff --git a/docs/managers_EventManager.js.html b/docs/managers_EventManager.js.html index 1eefe62..cf1a812 100644 --- a/docs/managers_EventManager.js.html +++ b/docs/managers_EventManager.js.html @@ -83,7 +83,7 @@ @@ -178,7 +178,7 @@

/** @type {Event} */ const eventFile = new (require(path))(this.client, this); - if(!eventFile.enabled) reject(new DisGroupDevError(Messages.EVENT_NOT_ENABLED)); + if(!eventFile.enabled) reject(Messages.EVENT_NOT_ENABLED); eventFile.location = path; diff --git a/docs/managers_InteractionManager.js.html b/docs/managers_InteractionManager.js.html index 412ca17..f23bce1 100644 --- a/docs/managers_InteractionManager.js.html +++ b/docs/managers_InteractionManager.js.html @@ -83,7 +83,7 @@ diff --git a/docs/managers_StatusPageChecker.js.html b/docs/managers_StatusPageChecker.js.html index 268ab26..533c3f5 100644 --- a/docs/managers_StatusPageChecker.js.html +++ b/docs/managers_StatusPageChecker.js.html @@ -83,7 +83,7 @@ diff --git a/docs/managers_TextTicketManager.js.html b/docs/managers_TextTicketManager.js.html index 6924b16..24e42fa 100644 --- a/docs/managers_TextTicketManager.js.html +++ b/docs/managers_TextTicketManager.js.html @@ -83,7 +83,7 @@ diff --git a/docs/managers_TranslationManager.js.html b/docs/managers_TranslationManager.js.html index b705386..a6ed690 100644 --- a/docs/managers_TranslationManager.js.html +++ b/docs/managers_TranslationManager.js.html @@ -83,7 +83,7 @@ diff --git a/docs/managers_interaction_ButtonInteractionManager.js.html b/docs/managers_interaction_ButtonInteractionManager.js.html index 5fa49d8..878cbc3 100644 --- a/docs/managers_interaction_ButtonInteractionManager.js.html +++ b/docs/managers_interaction_ButtonInteractionManager.js.html @@ -83,7 +83,7 @@ @@ -168,7 +168,7 @@

/** @type {ButtonInteraction} */ const buttonInteraction = new(require(path))(this.client, this.manager); - if(!buttonInteraction.enabled) reject(new DisGroupDevError(Messages.INTERACTION_NOT_ENABLED)); + if(!buttonInteraction.enabled) reject(Messages.INTERACTION_NOT_ENABLED); buttonInteraction.location = path; @@ -216,7 +216,7 @@

if(buttonInteractionDirectoryStat.isDirectory()) { - const buttonInteractionDirectoryCategory = await readDirectory(require('node:paht').resolve(this.manager.options.locationButtonInteractions, buttonInteractionDirectoryCategoryOrFile)); + const buttonInteractionDirectoryCategory = await readDirectory(require('node:path').resolve(this.manager.options.locationButtonInteractions, buttonInteractionDirectoryCategoryOrFile)); for(const buttonInteractionDirectoryCategoryFile of buttonInteractionDirectoryCategory) { @@ -298,7 +298,7 @@

for(const buttonInteraction of this.cache) { - await this.unload(buttonInteraction.name); + await this.unload(buttonInteraction[1].name); } @@ -367,7 +367,7 @@

for(const buttonInteraction of this.cache) { - await this.unload(buttonInteraction.name); + await this.unload(buttonInteraction[1].name); } diff --git a/docs/managers_interaction_ContextInteractionManager.js.html b/docs/managers_interaction_ContextInteractionManager.js.html index 2cfdec4..86b69a3 100644 --- a/docs/managers_interaction_ContextInteractionManager.js.html +++ b/docs/managers_interaction_ContextInteractionManager.js.html @@ -83,7 +83,7 @@ @@ -271,7 +271,7 @@

/** @type {ContextInteraction} */ const contextInteraction = new(require(path))(this.client, this.manager); - if(!contextInteraction.enabled) reject(new DisGroupDevError(Messages.INTERACTION_NOT_ENABLED)); + if(!contextInteraction.enabled) reject(Messages.INTERACTION_NOT_ENABLED); contextInteraction.location = path; @@ -319,7 +319,7 @@

if(contextInteractionDirectoryStat.isDirectory()) { - const contextInteractionDirectoryCategory = await readDirectory(require('node:paht').resolve(this.manager.options.locationContextInteractions, contextInteractionDirectoryCategoryOrFile)); + const contextInteractionDirectoryCategory = await readDirectory(require('node:path').resolve(this.manager.options.locationContextInteractions, contextInteractionDirectoryCategoryOrFile)); for(const contextInteractionDirectoryCategoryFile of contextInteractionDirectoryCategory) { @@ -401,7 +401,7 @@

for(const contextInteraction of this.cache) { - await this.unload(contextInteraction.name); + await this.unload(contextInteraction[1].name); } @@ -470,7 +470,7 @@

for(const contextInteraction of this.cache) { - await this.unload(contextInteraction.name); + await this.unload(contextInteraction[1].name); } diff --git a/docs/managers_interaction_ModalInteractionManager.js.html b/docs/managers_interaction_ModalInteractionManager.js.html index b06580d..e0565d7 100644 --- a/docs/managers_interaction_ModalInteractionManager.js.html +++ b/docs/managers_interaction_ModalInteractionManager.js.html @@ -83,7 +83,7 @@ @@ -168,7 +168,7 @@

/** @type {ModalInteraction} */ const modalInteraction = new(require(path))(this.client, this.manager); - if(!modalInteraction.enabled) reject(new DisGroupDevError(Messages.INTERACTION_NOT_ENABLED)); + if(!modalInteraction.enabled) reject(Messages.INTERACTION_NOT_ENABLED); modalInteraction.location = path; @@ -216,7 +216,7 @@

if(modalInteractionDirectoryStat.isDirectory()) { - const modalInteractionDirectoryCategory = await readDirectory(require('node:paht').resolve(this.manager.options.locationModalInteractions, modalInteractionDirectoryCategoryOrFile)); + const modalInteractionDirectoryCategory = await readDirectory(require('node:path').resolve(this.manager.options.locationModalInteractions, modalInteractionDirectoryCategoryOrFile)); for(const modalInteractionDirectoryCategoryFile of modalInteractionDirectoryCategory) { @@ -298,7 +298,7 @@

for(const modalInteraction of this.cache) { - await this.unload(modalInteraction.name); + await this.unload(modalInteraction[1].name); } @@ -367,7 +367,7 @@

for(const modalInteraction of this.cache) { - await this.unload(modalInteraction.name); + await this.unload(modalInteraction[1].name); } diff --git a/docs/managers_interaction_SelectMenuInteractionManager.js.html b/docs/managers_interaction_SelectMenuInteractionManager.js.html index 24ecc3c..bdce55a 100644 --- a/docs/managers_interaction_SelectMenuInteractionManager.js.html +++ b/docs/managers_interaction_SelectMenuInteractionManager.js.html @@ -83,7 +83,7 @@ @@ -168,7 +168,7 @@

/** @type {SelectMenuInteraction} */ const selectMenuInteraction = new(require(path))(this.client, this.manager); - if(!selectMenuInteraction.enabled) reject(new DisGroupDevError(Messages.INTERACTION_NOT_ENABLED)); + if(!selectMenuInteraction.enabled) reject(Messages.INTERACTION_NOT_ENABLED); selectMenuInteraction.location = path; @@ -216,7 +216,7 @@

if(selectMenuInteractionDirectoryStat.isDirectory()) { - const selectMenuInteractionDirectoryCategory = await readDirectory(require('node:paht').resolve(this.manager.options.locationSelectMenuInteractions, selectMenuInteractionDirectoryCategoryOrFile)); + const selectMenuInteractionDirectoryCategory = await readDirectory(require('node:path').resolve(this.manager.options.locationSelectMenuInteractions, selectMenuInteractionDirectoryCategoryOrFile)); for(const selectMenuInteractionDirectoryCategoryFile of selectMenuInteractionDirectoryCategory) { @@ -298,7 +298,7 @@

for(const selectMenuInteraction of this.cache) { - await this.unload(selectMenuInteraction.name); + await this.unload(selectMenuInteraction[1].name); } @@ -367,7 +367,7 @@

for(const selectMenuInteraction of this.cache) { - await this.unload(selectMenuInteraction.name); + await this.unload(selectMenuInteraction[1].name); } diff --git a/docs/managers_interaction_SlashCommandInteractionManager.js.html b/docs/managers_interaction_SlashCommandInteractionManager.js.html index 154119a..e62d954 100644 --- a/docs/managers_interaction_SlashCommandInteractionManager.js.html +++ b/docs/managers_interaction_SlashCommandInteractionManager.js.html @@ -83,7 +83,7 @@ @@ -271,7 +271,7 @@

/** @type {SlashCommand} */ const slashCommand = new(require(path))(this.client, this.manager); - if(!slashCommand.enabled) reject(new DisGroupDevError(Messages.INTERACTION_NOT_ENABLED)); + if(!slashCommand.enabled) reject(Messages.INTERACTION_NOT_ENABLED); slashCommand.location = path; @@ -319,7 +319,7 @@

if(slashCommandDirectoryStat.isDirectory()) { - const slashCommandDirectoryCategory = await readDirectory(require('node:paht').resolve(this.manager.options.locationSlashCommands, slashCommandDirectoryCategoryOrFile)); + const slashCommandDirectoryCategory = await readDirectory(require('node:path').resolve(this.manager.options.locationSlashCommands, slashCommandDirectoryCategoryOrFile)); for(const slashCommandDirectoryCategoryFile of slashCommandDirectoryCategory) { @@ -401,7 +401,7 @@

for(const slashCommand of this.cache) { - await this.unload(slashCommand.name); + await this.unload(slashCommand[1].name); } @@ -469,8 +469,8 @@

try { for(const slashCommand of this.cache) { - - await this.unload(slashCommand.name); +console.log(slashCommand[1]) + await this.unload(slashCommand[1].name); } diff --git a/docs/structures_BaseTicket.js.html b/docs/structures_BaseTicket.js.html index cd85e7b..9046bac 100644 --- a/docs/structures_BaseTicket.js.html +++ b/docs/structures_BaseTicket.js.html @@ -83,7 +83,7 @@ diff --git a/docs/structures_Event.js.html b/docs/structures_Event.js.html index 2240fe9..844e435 100644 --- a/docs/structures_Event.js.html +++ b/docs/structures_Event.js.html @@ -83,7 +83,7 @@ diff --git a/docs/structures_TextTicket.js.html b/docs/structures_TextTicket.js.html index f806a77..2f3ed96 100644 --- a/docs/structures_TextTicket.js.html +++ b/docs/structures_TextTicket.js.html @@ -83,7 +83,7 @@ diff --git a/docs/structures_interaction_BaseComponent.js.html b/docs/structures_interaction_BaseComponent.js.html index a4835dd..25c3caa 100644 --- a/docs/structures_interaction_BaseComponent.js.html +++ b/docs/structures_interaction_BaseComponent.js.html @@ -83,7 +83,7 @@ diff --git a/docs/structures_interaction_BaseInteraction.js.html b/docs/structures_interaction_BaseInteraction.js.html index f6921e1..c03785e 100644 --- a/docs/structures_interaction_BaseInteraction.js.html +++ b/docs/structures_interaction_BaseInteraction.js.html @@ -83,7 +83,7 @@ diff --git a/docs/structures_interaction_ButtonInteraction.js.html b/docs/structures_interaction_ButtonInteraction.js.html index ca83948..81f8d9b 100644 --- a/docs/structures_interaction_ButtonInteraction.js.html +++ b/docs/structures_interaction_ButtonInteraction.js.html @@ -83,7 +83,7 @@ diff --git a/docs/structures_interaction_ContextInteraction.js.html b/docs/structures_interaction_ContextInteraction.js.html index cd8376d..f9c0d2b 100644 --- a/docs/structures_interaction_ContextInteraction.js.html +++ b/docs/structures_interaction_ContextInteraction.js.html @@ -83,7 +83,7 @@ diff --git a/docs/structures_interaction_ModalInteraction.js.html b/docs/structures_interaction_ModalInteraction.js.html index 6a26ae2..70ec9e1 100644 --- a/docs/structures_interaction_ModalInteraction.js.html +++ b/docs/structures_interaction_ModalInteraction.js.html @@ -83,7 +83,7 @@ diff --git a/docs/structures_interaction_SelectMenuInteraction.js.html b/docs/structures_interaction_SelectMenuInteraction.js.html index eb07a3f..0938bcc 100644 --- a/docs/structures_interaction_SelectMenuInteraction.js.html +++ b/docs/structures_interaction_SelectMenuInteraction.js.html @@ -83,7 +83,7 @@ diff --git a/docs/structures_interaction_SlashCommand.js.html b/docs/structures_interaction_SlashCommand.js.html index 3acc120..3f5e2f6 100644 --- a/docs/structures_interaction_SlashCommand.js.html +++ b/docs/structures_interaction_SlashCommand.js.html @@ -83,7 +83,7 @@ diff --git a/docs/utils_Badges.js.html b/docs/utils_Badges.js.html index 49e1cae..6fb641d 100644 --- a/docs/utils_Badges.js.html +++ b/docs/utils_Badges.js.html @@ -83,7 +83,7 @@ diff --git a/docs/utils_Colors.js.html b/docs/utils_Colors.js.html index a2c2140..69641a0 100644 --- a/docs/utils_Colors.js.html +++ b/docs/utils_Colors.js.html @@ -83,7 +83,7 @@ diff --git a/docs/utils_Emojis.js.html b/docs/utils_Emojis.js.html index 8a8db90..6f20451 100644 --- a/docs/utils_Emojis.js.html +++ b/docs/utils_Emojis.js.html @@ -83,7 +83,7 @@ diff --git a/docs/utils_Logger.js.html b/docs/utils_Logger.js.html index 01a42a3..9c1a1c1 100644 --- a/docs/utils_Logger.js.html +++ b/docs/utils_Logger.js.html @@ -83,7 +83,7 @@ diff --git a/docs/utils_Partner.js.html b/docs/utils_Partner.js.html index cceacc7..49a58a9 100644 --- a/docs/utils_Partner.js.html +++ b/docs/utils_Partner.js.html @@ -83,7 +83,7 @@ diff --git a/docs/utils_Utilities.js.html b/docs/utils_Utilities.js.html index 2870ac8..cdb4cf9 100644 --- a/docs/utils_Utilities.js.html +++ b/docs/utils_Utilities.js.html @@ -83,7 +83,7 @@ diff --git a/lib/managers/EventManager.js b/lib/managers/EventManager.js index 3a0d51d..0d71880 100644 --- a/lib/managers/EventManager.js +++ b/lib/managers/EventManager.js @@ -67,7 +67,7 @@ class EventManager extends EventEmitter { /** @type {Event} */ const eventFile = new (require(path))(this.client, this); - if(!eventFile.enabled) reject(new DisGroupDevError(Messages.EVENT_NOT_ENABLED)); + if(!eventFile.enabled) reject(Messages.EVENT_NOT_ENABLED); eventFile.location = path; diff --git a/lib/managers/interaction/ButtonInteractionManager.js b/lib/managers/interaction/ButtonInteractionManager.js index 200ab0d..d38c5bf 100644 --- a/lib/managers/interaction/ButtonInteractionManager.js +++ b/lib/managers/interaction/ButtonInteractionManager.js @@ -57,7 +57,7 @@ class ButtonInteractionManager { /** @type {ButtonInteraction} */ const buttonInteraction = new(require(path))(this.client, this.manager); - if(!buttonInteraction.enabled) reject(new DisGroupDevError(Messages.INTERACTION_NOT_ENABLED)); + if(!buttonInteraction.enabled) reject(Messages.INTERACTION_NOT_ENABLED); buttonInteraction.location = path; @@ -105,7 +105,7 @@ class ButtonInteractionManager { if(buttonInteractionDirectoryStat.isDirectory()) { - const buttonInteractionDirectoryCategory = await readDirectory(require('node:paht').resolve(this.manager.options.locationButtonInteractions, buttonInteractionDirectoryCategoryOrFile)); + const buttonInteractionDirectoryCategory = await readDirectory(require('node:path').resolve(this.manager.options.locationButtonInteractions, buttonInteractionDirectoryCategoryOrFile)); for(const buttonInteractionDirectoryCategoryFile of buttonInteractionDirectoryCategory) { @@ -187,7 +187,7 @@ class ButtonInteractionManager { for(const buttonInteraction of this.cache) { - await this.unload(buttonInteraction.name); + await this.unload(buttonInteraction[1].name); } @@ -256,7 +256,7 @@ class ButtonInteractionManager { for(const buttonInteraction of this.cache) { - await this.unload(buttonInteraction.name); + await this.unload(buttonInteraction[1].name); } diff --git a/lib/managers/interaction/ContextInteractionManager.js b/lib/managers/interaction/ContextInteractionManager.js index c742b4b..468e374 100644 --- a/lib/managers/interaction/ContextInteractionManager.js +++ b/lib/managers/interaction/ContextInteractionManager.js @@ -160,7 +160,7 @@ class ContextInteractionManager { /** @type {ContextInteraction} */ const contextInteraction = new(require(path))(this.client, this.manager); - if(!contextInteraction.enabled) reject(new DisGroupDevError(Messages.INTERACTION_NOT_ENABLED)); + if(!contextInteraction.enabled) reject(Messages.INTERACTION_NOT_ENABLED); contextInteraction.location = path; @@ -208,7 +208,7 @@ class ContextInteractionManager { if(contextInteractionDirectoryStat.isDirectory()) { - const contextInteractionDirectoryCategory = await readDirectory(require('node:paht').resolve(this.manager.options.locationContextInteractions, contextInteractionDirectoryCategoryOrFile)); + const contextInteractionDirectoryCategory = await readDirectory(require('node:path').resolve(this.manager.options.locationContextInteractions, contextInteractionDirectoryCategoryOrFile)); for(const contextInteractionDirectoryCategoryFile of contextInteractionDirectoryCategory) { @@ -290,7 +290,7 @@ class ContextInteractionManager { for(const contextInteraction of this.cache) { - await this.unload(contextInteraction.name); + await this.unload(contextInteraction[1].name); } @@ -359,7 +359,7 @@ class ContextInteractionManager { for(const contextInteraction of this.cache) { - await this.unload(contextInteraction.name); + await this.unload(contextInteraction[1].name); } diff --git a/lib/managers/interaction/ModalInteractionManager.js b/lib/managers/interaction/ModalInteractionManager.js index 38123be..b554c1b 100644 --- a/lib/managers/interaction/ModalInteractionManager.js +++ b/lib/managers/interaction/ModalInteractionManager.js @@ -57,7 +57,7 @@ class ModalInteractionManager { /** @type {ModalInteraction} */ const modalInteraction = new(require(path))(this.client, this.manager); - if(!modalInteraction.enabled) reject(new DisGroupDevError(Messages.INTERACTION_NOT_ENABLED)); + if(!modalInteraction.enabled) reject(Messages.INTERACTION_NOT_ENABLED); modalInteraction.location = path; @@ -105,7 +105,7 @@ class ModalInteractionManager { if(modalInteractionDirectoryStat.isDirectory()) { - const modalInteractionDirectoryCategory = await readDirectory(require('node:paht').resolve(this.manager.options.locationModalInteractions, modalInteractionDirectoryCategoryOrFile)); + const modalInteractionDirectoryCategory = await readDirectory(require('node:path').resolve(this.manager.options.locationModalInteractions, modalInteractionDirectoryCategoryOrFile)); for(const modalInteractionDirectoryCategoryFile of modalInteractionDirectoryCategory) { @@ -187,7 +187,7 @@ class ModalInteractionManager { for(const modalInteraction of this.cache) { - await this.unload(modalInteraction.name); + await this.unload(modalInteraction[1].name); } @@ -256,7 +256,7 @@ class ModalInteractionManager { for(const modalInteraction of this.cache) { - await this.unload(modalInteraction.name); + await this.unload(modalInteraction[1].name); } diff --git a/lib/managers/interaction/SelectMenuInteractionManager.js b/lib/managers/interaction/SelectMenuInteractionManager.js index 77ad755..95d9471 100644 --- a/lib/managers/interaction/SelectMenuInteractionManager.js +++ b/lib/managers/interaction/SelectMenuInteractionManager.js @@ -57,7 +57,7 @@ class SelectMenuInteractionManager { /** @type {SelectMenuInteraction} */ const selectMenuInteraction = new(require(path))(this.client, this.manager); - if(!selectMenuInteraction.enabled) reject(new DisGroupDevError(Messages.INTERACTION_NOT_ENABLED)); + if(!selectMenuInteraction.enabled) reject(Messages.INTERACTION_NOT_ENABLED); selectMenuInteraction.location = path; @@ -105,7 +105,7 @@ class SelectMenuInteractionManager { if(selectMenuInteractionDirectoryStat.isDirectory()) { - const selectMenuInteractionDirectoryCategory = await readDirectory(require('node:paht').resolve(this.manager.options.locationSelectMenuInteractions, selectMenuInteractionDirectoryCategoryOrFile)); + const selectMenuInteractionDirectoryCategory = await readDirectory(require('node:path').resolve(this.manager.options.locationSelectMenuInteractions, selectMenuInteractionDirectoryCategoryOrFile)); for(const selectMenuInteractionDirectoryCategoryFile of selectMenuInteractionDirectoryCategory) { @@ -187,7 +187,7 @@ class SelectMenuInteractionManager { for(const selectMenuInteraction of this.cache) { - await this.unload(selectMenuInteraction.name); + await this.unload(selectMenuInteraction[1].name); } @@ -256,7 +256,7 @@ class SelectMenuInteractionManager { for(const selectMenuInteraction of this.cache) { - await this.unload(selectMenuInteraction.name); + await this.unload(selectMenuInteraction[1].name); } diff --git a/lib/managers/interaction/SlashCommandInteractionManager.js b/lib/managers/interaction/SlashCommandInteractionManager.js index 42ae7f2..e5931db 100644 --- a/lib/managers/interaction/SlashCommandInteractionManager.js +++ b/lib/managers/interaction/SlashCommandInteractionManager.js @@ -160,7 +160,7 @@ class SlashCommandInteractionManager { /** @type {SlashCommand} */ const slashCommand = new(require(path))(this.client, this.manager); - if(!slashCommand.enabled) reject(new DisGroupDevError(Messages.INTERACTION_NOT_ENABLED)); + if(!slashCommand.enabled) reject(Messages.INTERACTION_NOT_ENABLED); slashCommand.location = path; @@ -208,7 +208,7 @@ class SlashCommandInteractionManager { if(slashCommandDirectoryStat.isDirectory()) { - const slashCommandDirectoryCategory = await readDirectory(require('node:paht').resolve(this.manager.options.locationSlashCommands, slashCommandDirectoryCategoryOrFile)); + const slashCommandDirectoryCategory = await readDirectory(require('node:path').resolve(this.manager.options.locationSlashCommands, slashCommandDirectoryCategoryOrFile)); for(const slashCommandDirectoryCategoryFile of slashCommandDirectoryCategory) { @@ -290,7 +290,7 @@ class SlashCommandInteractionManager { for(const slashCommand of this.cache) { - await this.unload(slashCommand.name); + await this.unload(slashCommand[1].name); } @@ -358,8 +358,8 @@ class SlashCommandInteractionManager { try { for(const slashCommand of this.cache) { - - await this.unload(slashCommand.name); +console.log(slashCommand[1]) + await this.unload(slashCommand[1].name); } diff --git a/test/Interactions/Slash/General/Ping.js b/test/Interactions/Slash/General/Ping.js new file mode 100644 index 0000000..ee2edb2 --- /dev/null +++ b/test/Interactions/Slash/General/Ping.js @@ -0,0 +1,27 @@ +const Discord = require('discord.js'); + +const { SlashCommand } = require('../../../../lib'); + +class Ping extends SlashCommand { + + constructor(client, manager) { + + super(client, manager, { + + name: 'ping', + description: 'pong', + enabled: true + + }); + + } + + execute(interaction) { + + + + } + +} + +module.exports = Ping; \ No newline at end of file diff --git a/test/loadInteractions.js b/test/loadInteractions.js index aa35595..85dac50 100644 --- a/test/loadInteractions.js +++ b/test/loadInteractions.js @@ -1,2 +1,21 @@ const { InteractionManager } = require('../lib'); +const { Client, Intents } = require('discord.js'); +const { token } = require('./auth.js'); +const client = new Client({ intents: [ Intents.FLAGS.GUILDS, Intents.FLAGS.GUILD_MESSAGES ] }); + +client.interactions = new InteractionManager(client, { locationSlashCommands: require('node:path').join(__dirname, './Interactions/Slash') }); + +client.login(token) + +setTimeout(async () => { + + await client.interactions.slash.loadAll(); + + //console.log(client.interactions.slash.cache); + + await client.interactions.slash.unloadAll(); + + console.log(client.interactions.slash.cache); + +}, 2000); \ No newline at end of file