diff --git a/commands/automatisation/viewtasks.ts b/commands/automatisation/viewtasks.ts index d4354ec..b8cf54a 100644 --- a/commands/automatisation/viewtasks.ts +++ b/commands/automatisation/viewtasks.ts @@ -17,7 +17,12 @@ module.exports = { rows.forEach((row: any) => { tasks += `\n- ${row.id} - ${row.name} : ${row.time} minutes`; }); - message.edit(`# Liste des tâches :${tasks}`); + + const tasksChunks = tasks.match(/.{1,2000}/g); + + tasksChunks.forEach((chunk: string) => { + message.edit(`# Liste des tâches :${chunk}`); + }); }); } }; \ No newline at end of file