Skip to content

Commit

Permalink
Tri des modules par le nom de packet
Browse files Browse the repository at this point in the history
  • Loading branch information
johan-perso committed Nov 1, 2023
1 parent 2e3e7c4 commit ae20d61
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion modules/bachero.module.moduleInfo/module.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,10 @@ module.exports = {
var packageName = interaction.options.getString("packagename")

// Obtenir la liste des modules si elle n'a pas encore été défini
if(!listModules?.length) listModules = Object.values(Object.fromEntries(allModulesDetails))
if(!listModules?.length){
listModules = Object.values(Object.fromEntries(allModulesDetails))
listModules.sort((a, b) => a.packageName.localeCompare(b.packageName)) // On trie par ordre alphabétique du packageName
}

// Diviser la liste en plusieurs pages
var modulesMessage = ""
Expand Down

0 comments on commit ae20d61

Please sign in to comment.