diff --git a/src/corps.js b/src/corps.js index 8e0b8687fe76259f2c25e375738f3adf1a3ee205..f1ddd50248480aeab97f2b504aca386464cfca2d 100644 --- a/src/corps.js +++ b/src/corps.js @@ -24,7 +24,7 @@ function handleCommand(message, cmdName, args) { case "list": case "liste": - case "listeuh": //POUR DEV PIPO SANS TUER LA LISTE DE CAMBOT + case "listeuh": list(message); break; @@ -80,7 +80,14 @@ function add(args, message){ const nombreInit = map.get(article) ?? 0; map.set(article,nombreInit + nb); } - message.channel.send("Vos articles ont bien été ajoutés."); + message.channel.send("Vos articles ont bien été ajoutés."); + + //on affiche la liste: + let rep = ''; + for (const [key, value] of map) + rep += `**${value}** ${key}\n`; + message.channel.send(rep); + } function remove(args, message){