From 0fca13aed99bb5af182da00e507aa2b6f00971d4 Mon Sep 17 00:00:00 2001
From: Camille <ltheo2029@gmail.com>
Date: Mon, 22 Nov 2021 10:18:22 +0100
Subject: [PATCH] add update

---
 src/corps.js | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/src/corps.js b/src/corps.js
index 8e0b868..f1ddd50 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){
-- 
GitLab