From 266dbc8d44dd9a36180a1c58365c817c3c85ab1d Mon Sep 17 00:00:00 2001 From: Eric Matala de Mazza Date: Thu, 27 Apr 2023 04:47:19 +0200 Subject: [PATCH] feat: get all duties --- src/index.ts | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/index.ts b/src/index.ts index aad9b7a..ec191f0 100644 --- a/src/index.ts +++ b/src/index.ts @@ -23,7 +23,17 @@ bot.command("get", (ctx) => { else ctx.reply(`Du bist dran mit ${duty.title} (${duty.description})`); }); -bot.command("getall", (ctx) => {}); +bot.command("getall", (ctx) => { + const message = mapping + .map(({ roomie, duty, done }) => + done + ? `${roomie.name} ist fertig` + : `${roomie.name} ist dran mit ${duty.title} (${duty.description})` + ) + .join("\n"); + ctx.reply(message); +}); + bot.command("done", (ctx) => {}); bot.command("off", (ctx) => {});