Skip to content

Commit

Permalink
feat: get all duties
Browse files Browse the repository at this point in the history
  • Loading branch information
ematala committed Apr 27, 2023
1 parent 8947d26 commit 266dbc8
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {});

Expand Down

0 comments on commit 266dbc8

Please sign in to comment.