ChangeLog

This is a log of all version history and changes made to Discord Features Handler npm package

1.1.2 - 2023-02-05

Feat/fix:

  • Update interaction handler for isButton, isAutoComplete, isContextMenu, isModalSubmit with code that works for the respective interaction instead of a blank ifstatement and also implement a try/catch for these interaction if such interaction were to fail and would not crash the bot

    • Command Properties for the interactionCreate event of interaction.isContextMenu or interaction.isUserContextMenu (discord.js v13):

      • contextMenuInteraction(interaction, client, level) is used to execute the interaction

    • Command Properties for the interactionCreate event of interaction.isAutocomplete:

      • autoCompleteInteraction(interaction, client, level) is used to execute the interaction

    • Command Properties for the interactionCreate event of interaction.isModalSubmit:

      • modalCustomId, for customId of a button interaction object

      • modalInteraction(interaction, client, level) is used to execute the interaction

    • Command Properties for the interactionCreate event of interaction.isButton:

      • buttomCustomId, for customId of a button interaction object

      • buttonInteraction(interaction, client, level) is used to execute the interaction

1.1.1 - 2022-08-23

Doc:

  • Update readme file about the dev branch and folder structure, support and notes sections

  • Added code examples in the readme file, to help developers understand the structure better without a deep dive into the documentation.

Fix:

  • Reload command is now able to read the category folders when unloading and loading a command.

  • Improved console log messages when loading a slash command

1.1.0 - 2022-07-17

  • Feat: Disable the built-in unhandledRejection handler

    • The option parameter is disableUnhandledRejectionHandler, to disable unhandled promise rejection to prevent bot from unnecessary crash. Default value is false.

  • Feat: Turn off console log stating the filenames that are being loaded

    • The DiscordFeaturesHandler option parameter is loadCommandsLoggerOff, is used to turn off stating the filename of the command file being loaded. Default value is false.

    • The DiscordFeaturesHandler option parameter is loadEventsLoggerOff, is used to turn off stating the filename of the event file being loaded. Default value is false.

    • The DiscordFeaturesHandler option parameter is loadModulesLoggerOff, is used to turn off stating the filename of the module file being loaded. Default value is false.

  • Feat: Wait time before loading module files from module folder

    • Reduced wait time from 10 to 5 seconds.

    • Module files can include discord guild, channel, and user information request access through the Discord API. In order for that to happen we need to establish a wait time before loading the module files and ensuring our discord bot is logged in order to obtain the information requested in the module files. Therefore a wait time need to be established.

    • The DiscordFeaturesHandler option parameter is modulesPreloadTime, expected value is a number reflecting milliseconds. The default value is: 5000, which is a wait time of 5 seconds.

  • Feat: Array.prototype.random()

    • When creating an array, you can use <Array>.random() to get a return of an random element of the array.

      • Ex: ['a','b','c','d','e'].random()

        • Returns any element at random of the 5 strings in the array. Such as string b

  • Documentation:

    • More inline documentation using jsdoc

      • When hovering or typing to depict what the is the parameter and the correct spelling of the parameter.

      • Able to give a brief description of the parameter and use cases.

    • Fix readme files with more demo code

    • More details for explaining the add-on feature

1.0.3 - 2022-06-27

  • Bug Fix: Reload command was not working.

    • missing concatenate between the filename and .js when unloading the command.

    • (upcoming tests for removing extension for to allow both javascript and typescript files)

1.0.2 - 2022-06-24

  • Doc: Updated readme and jsdoc3 documentation

    • Longer readme.md file for npmjs website, for easier access to a quick start documentation to start creating events, commands and using the handler instead of going through a full documentation

    • Using jsdoc to display details when hover over properties names after installing DiscordFeaturesHandler and understand the property with a brief description of it, without documentation referencing and guidance.

1.0.1 - 2022-06-19

  • Patch Fix:

    • DiscordFeaturesHandler can not be correctly imported without typing out import after installing.

  • Bug Fix:

    • disableProperties was not implemented correctly.

1.0.0 - 2022-06-19

  • Feat:

    • Compatible with Heroku and other hosting services for node.js code

    • Ability to turn off console.log for stating what file is loaded on runtime, so you only see error message if failed to load. Add as boolean properties for options property in DiscordFeaturesHandler

      • loadCommandsLoggerOff - type boolean

        • turn off console.log(loading command: <filename>)

      • loadEventsLoggerOff - for console.log(loading event: <filename>)

      • loadModulesLoggerOff - for console.log(loading module: <filename>)

    • Deprecated: disableAllDefaults, disableDefaultHelpCmd, disableDefaultReloadCmd, and disableDefaultMessageCreate.

      • use disableBuiltIn object instead.

  • Doc:

    • Fully complete documentation and my definition of "official" release

      • Was not expecting downloads after publishing as this is my first npm package

0.13.11 - 2022-06-18

  • Bug fix for heroku / server based hosting

    • Fixed path to load commands file

0.13.10 - 2022-06-18

  • Bug fix for heroku / server based hosting

    • Find path of configuration file when using heroku server.

0.13.9 - 2022-06-17

  • New object for DiscordFeaturesHandler options Property to disable Built-in Features:

    • disableBuiltIn is an object that contains boolean properties to disable built-in features. The object is created to be more readable object to use for disabling events and commands.

  • Deprecation warnings for disableAllDefaults, disableDefaultHelpCmd, disableDefaultReloadCmd, and disableDefaultMessageCreate.

  • Bug Fix: when new features was declared was overriding default properties

0.13.7 - 2022-06-14

  • Patch Fix:

    • Syntax error fix re-enable ability to disable reload and messageCreate event.

0.13.6 - 2022-06-12

  • Updated command, events, modules handler from for loops => map and use of Promises

    • Handles modules files load time better in which you can now insert async/await basic files such as loading mongoDB data into a channel on run.

0.13.1 - 2022-06-12

  • changed property filesToExcludeInHandlers from an Array<String> to an object

  • property filesToExcludeInHandlers, now contains object properties of commands, events, and modules which is all optional Array<String>.

0.13.0 - 2022-06-12

  • Removed requirement of defining folder properties names and use the default names:

    • Default Command Folder name as "commands"

    • Default Events Folder name as "events"

    • Default Modules Folder name as "modules"

  • Updated README.md file

0.12.0 - 2022-06-11

  • Updated README.md file and link to Documentation for npmjs.com Readme page

0.11.1 - 2022-06-07

  • Updated README.md file

0.11.0 - 2022-06-07

  • Revisit properties name and clarify naming conventions

    • mainDir => mainDirectory

0.10.0 - 2022-06-07

  • First Version and Launch of Discord Features Handler

Last updated