Skip to content
On this page

Changelog of V4 🚀

[4.0.2] - August 1, 2022

Typings

  • Fix typings: Add typings

[4.0.1] - August 1, 2022

Fixes

  • Fix adminsOnly permission on commands (slash-commands AND message-commands) (cff7c76)
  • Fix ClientUtil#getX return an array of structures instedof an array of arrays (05aaacb)

[4.0.0] - July 30, 2022

General

  • Improve typings in general (caeb29c)
  • Improve errors management (6f8b2b9)
  • [Cooldowns]: Refactor cooldown system (access in client.cooldowns) #87 (1224753)

Client

  • Collections (client.collections) contain now an array of structures. (cd74b3d)
  • [ShewenyClientOptions]: Add disableCooldownForAdmins option (3fbd807)
  • [ClientUtil]: getX return an array (Array.from(interator)) instedof an iterator. (0cab451)
  • [ClientUtil]: Add resolveCommand function (88d93cd).

Structures

  • [Command]: Fix descriptionLocalizations. (cb13044)
  • [Inhibitor]: Change function execute and onFailure first parapeter is now the structure (client => structure type of BaseStructure) (448f55e)
  • [Command] : Add nameLocalizations and descriptionLocalizations keys in structures. (897f1a1 & ed51bf5)
  • [Command]: userPermissions and clientPermissions is now of type PermissionResolvable[]. (897f1a1 & ed51bf5)
  • [Command]: Fix channel types (add global) (ed51bf5)
  • [Command]: Support slash-commands permissions (897f1a1 & ed51bf5)
  • Possibility to enable or disable structures. (2f054c9)
  • Change register and unregister functions: Return the structure without saving it in a collection. (5ad3c46)
  • Modals support (d084556)
    • [Modal]: Create this structure
  • [Command]: Add "COMMAND" type in message command (88d93cd).
  • [Command]: Add "GLOBAL" type in channel option (2933afd).
  • [Structures]: Allow regular expressions and strings in same array (c7f41b1)

Managers

  • [CommandsManager]: Change type of the prefix key, it can be a function with ctx: Message | Interaction as a parameter. (644888b)
  • [CommandsManager]: Permissions events change signature: (ctx: Message|Interaction, perms: string[], command:Command). (2373369)
  • [CommandsManager]: Add strategies for register application commands. (09f3b49)
  • Managers: Collections can't be null now, however the collections can be empty. (cd74b3d)
  • CommandsManager: Change the getApplicationCommandData prototype : the parameter is the command (Command type) returns: ApplicationCommandData. (92340a9).
  • CommandsManager: Add getAllApplicationCommandData function that take a collection of commands in parameter and returns an array of ApplicationCommandData (ApplicationCommandData[]) (92340a9).

Events

  • Improve errors display on events. (43d3724)
  • Support array of structures in collections. (1f88271)
  • [CommandsManager]: emit invalidChannel event when command is in bad channel (b39ae2c)

Loader V2

  • Support custom project structures
  • Support arrays of structures. (59ef1d2 & cd74b3d)
  • Fix loading cland readonly _id property on loadable classes (BaseStructure) (7b2d691)
  • Add a static, private and readonly _id property on loadable classes (BaseStructure) (7b2d691)
  • Check the instance of structure (42dccc7)
  • Allow multiples exportations per file (42dccc7)
  • Allow mix of structures in files (42dccc7)
  • Remove loadFiles function
  • Remove readDirAndPush function