Changeset 23bddf3 in python-cinema-club-bot for commands/event.py


Ignore:
Timestamp:
Oct 10, 2024, 6:20:52 AM (5 weeks ago)
Author:
Mikhail Kirillov <w96k@…>
Branches:
master
Children:
1f94544
Parents:
8d2d5ac
Message:

Task #10. /announce command

File:
1 edited

Legend:

Unmodified
Added
Removed
  • commands/event.py

    r8d2d5ac r23bddf3  
    7676    if events == [] or is_past(events[-1]["when"]):
    7777        events.append(event_dict)
    78         await update.message.reply_text(EVENT_CREATED.format(when=event_when))
     78        await update.message.reply_text(
     79            EVENT_CREATED.format(
     80                when=event_when,
     81                movie=event_dict["movie"],
     82            )
     83        )
    7984    else:
     85        old_when = events[-1]["when"]
     86        old_where = events[-1]["where"]
    8087        events[-1] = event_dict
    81         await update.message.reply_text(EVENT_EDITED.format(when=event_when))
     88
     89        await update.message.reply_text(
     90            EVENT_EDITED.format(
     91                old_when=old_when,
     92                old_where=old_where,
     93                when=event_when,
     94                where=event_where,
     95                movie=event_dict["movie"],
     96            )
     97        )
    8298
    8399
Note: See TracChangeset for help on using the changeset viewer.