Releases: greencoast-studios/discord.js-extended
v3.0.1
This release marks the last version for this project as it is currently marked as deprecated and will no longer offer support.
Thank you to anyone that used this project and helped build it. Unfortunately we are no longer in a position where we can consistently work on it anymore. :(
This release correspond to the 3.0.1 version of this package. For more information, visit the README or the documentation.
Changelog
- Fixed bad generic typing for DataProvider class.
- Updated broken discord.js docs links in JSDocs.
v3.0.0
This release correspond to the 3.0.0 version of this package. For more information, visit the README or the documentation.
Changelog
- Updated dependencies
- Updated discord.js to v14
- Removed DataProviders from this package. They have been moved to their own packages instead.
- Improved typing for DataProvider methods.
- Fixed some typing issues with TypeScript.
v2.2.3
This release correspond to the 2.2.3 version of this package. For more information, visit the README or the documentation.
Changelog
- Fixed a bug where any bot would crash if a SlashCommand was thrown after the interaction was replied or deferred.
v2.2.2
This release correspond to the 2.2.2 version of this package. For more information, visit the README or the documentation.
Changelog
- Added error handling for Localizer.handleDelete to avoid crashes related to DataProvider.delete in case no locale settings are saved on a data provider and a delete throws an error if no key is present.
v2.2.1
This release correspond to the 2.2.1 version of this package. For more information, visit the README or the documentation.
Changelog
- Changed how config keys that had no types specified behave. They used to default to string and now the validation is skipped.
localizer.t()
now returns a message in the default locale in case it is not found for the specific locale instead of throwing and error.- Fixed a bug where guild localizers would not be created or removed when the bot entered a guild or left one.
- Fixed a bug where
RedisDataProvider.clear()
would throw if a guild had no keys associated.
v2.2.0
This release correspond to the 2.2.0 version of this package. For more information, visit the README or the documentation.
Changelog
- Added a RedisDataProvider with a Redis backend.
v2.1.1
This release correspond to the 2.1.1 version of this package. For more information, visit the README or the documentation.
Changelog
- Fixed a bug where the default commands would not be exported correctly.
v2.1.0
This release correspond to the 2.1.0 version of this package. For more information, visit the README or the documentation.
Changelog
- Added support for custom getters for
PresenteTemplater
. You can define acustomGetters
object inside ofclientOptions.presence
to map a custom key to a getter. - Added support for custom validators for
ConfigProvider
. You can define acustomValidators
object inside ofconfigProviderOptions
to map a config key to a validator function. This validator function should throw aTypeError
if the value provided is not valid according to your own criteria. - Added support for array config values. You can use types
string[]
,boolean[]
andnumber[]
. - Changed the behaviour of type casting for types that contain
string
. Before, if a type containedstring
, the value would be kept as a string. Now, the value will be cast to whatever other type is specified and remain as a string if the casting process failed. - Now, if a casting fails (if a value is passed through environment variables that do not conform to the type specified), the
ConfigProvider
constructor will throw. - Added a Localizer class to help with bot localization. To use this, simply pass a
localizer
object in the client's options and specify the translated messages inlocalizer.localeStrings
. The localizer contains the context for each guild what locale it should use. It also supports persistence if a data provider is added to the client. - Added a default SetLocaleCommand that updates the locale for the guild the command was issued from.
- Added regular and slash versions of HelpCommand and SetLocaleCommand.
- Changed how the default commands are registered. Pass
false
toclient.registry.registerDefaultCommands
to register the regular commands instead of the slash ones. Slash commands are registered by default if nothing is passed as parameter.
v2.0.0
This release correspond to the 2.0.0 version of this package. For more information, visit the README or the documentation.
Changelog
- Added support for Discord.js v13.
- Node 16.6 or higher is now required.
- Added support for Slash Commands.
- Added an utility class to handle slash command deployment.
- Message based commands should now extend RegularCommand instead of Command.
This is a breaking change, you should take the required precautions when updating the library on your bot.
v1.2.1
This release correspond to the 1.2.1 version of this package. For more information, visit the README or the documentation.
Changelog
- Fixed a bug where a command could be registered despite its alias being part of another command's aliases.
- Fixed a bug where a command could be registered despite one of its alias being its own name.
- Fixed a bug where
PresenceTemplater
would return the wrong values fornum_guilds
andnum_members
if the client was sharded. - Fixed a bug where
PresenceTemplater
would get all the available values for its keys despite the given string not containing any of them.