From e0b7657705e4a38d6809328511ffe7e63389e3ee Mon Sep 17 00:00:00 2001 From: Arhur Date: Fri, 26 Apr 2024 23:18:34 +0200 Subject: [PATCH] corrige bug in tasks command --- commands/automatisation/viewtasks.ts | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/commands/automatisation/viewtasks.ts b/commands/automatisation/viewtasks.ts index b8cf54a..7e98011 100644 --- a/commands/automatisation/viewtasks.ts +++ b/commands/automatisation/viewtasks.ts @@ -20,9 +20,13 @@ module.exports = { const tasksChunks = tasks.match(/.{1,2000}/g); - tasksChunks.forEach((chunk: string) => { - message.edit(`# Liste des tâches :${chunk}`); - }); + if (tasksChunks) { + tasksChunks.forEach((chunk: string) => { + message.edit(`# Liste des tâches :${chunk}`); + }); + } else { + message.edit(`# Liste des tâches :${tasks}`); + } }); } }; \ No newline at end of file