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