diff --git a/notif.js b/notif.js index 82db0e2..86ff5c5 100644 --- a/notif.js +++ b/notif.js @@ -2,15 +2,17 @@ const n = new Notification() // Passing Arguments here let textVar = args.plainTexts.toString() +let args_0 = textVar.split(",")[0] +let args_1 = textVar.split(",")[1] -n.title = "Emploi du temps 📚" n.subtitle = "" -// Avoid error for passed args -if(textVar === null || textVar === undefined || textVar === ""){ +if(args_1 === null || args_1 === undefined || args_1 === ""){ + n.title = textVar n.body = "Aucun résultat" }else{ - n.body = textVar.split(",")[1] + n.title = args_0 + n.body = args_1 } n.threadIdentifier = "Emploi du temps"