Skip to content

Commit

Permalink
feat: get own duty
Browse files Browse the repository at this point in the history
  • Loading branch information
ematala committed Apr 27, 2023
1 parent 3bf920d commit 8947d26
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,15 @@ bot.command("start", (ctx) =>
`Hi ${ctx.chat.type === "private" ? ctx.chat.first_name : "stranger"}`
)
);
bot.command("get", (ctx) => {});

bot.command("get", (ctx) => {
const { duty, done } = mapping.find(
({ roomie }) => roomie.id === ctx.chat.id
)!;
if (done) ctx.reply("Du bist für diese Woche fertig");
else ctx.reply(`Du bist dran mit ${duty.title} (${duty.description})`);
});

bot.command("getall", (ctx) => {});
bot.command("done", (ctx) => {});
bot.command("off", (ctx) => {});
Expand Down

0 comments on commit 8947d26

Please sign in to comment.