From 23bddf358dc615d18ed4470f33f383f1eac9ac63 Mon Sep 17 00:00:00 2001 From: Mikhail Kirillov Date: Thu, 10 Oct 2024 06:20:52 +0400 Subject: Task #10. /announce command --- commands/event.py | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) (limited to 'commands/event.py') diff --git a/commands/event.py b/commands/event.py index 5a7bf69..e06ea83 100644 --- a/commands/event.py +++ b/commands/event.py @@ -75,10 +75,26 @@ async def create_event( if events == [] or is_past(events[-1]["when"]): events.append(event_dict) - await update.message.reply_text(EVENT_CREATED.format(when=event_when)) + await update.message.reply_text( + EVENT_CREATED.format( + when=event_when, + movie=event_dict["movie"], + ) + ) else: + old_when = events[-1]["when"] + old_where = events[-1]["where"] events[-1] = event_dict - await update.message.reply_text(EVENT_EDITED.format(when=event_when)) + + await update.message.reply_text( + EVENT_EDITED.format( + old_when=old_when, + old_where=old_where, + when=event_when, + where=event_where, + movie=event_dict["movie"], + ) + ) async def list_events( -- cgit v1.2.3