fix date check
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Lia Schöneweiß 2024-01-02 21:50:15 +01:00
parent 2a344817f7
commit 9eafa55dd8

View File

@ -125,8 +125,8 @@ class AdventsHandler(BaseHandler):
reply_markup = InlineKeyboardMarkup(keyboard)
#if tuer_nummer <= int(date.today().strftime("%d")):
if (tuer_nummer <= int(date.today().strftime("%d"))) and (int(date.today().strftime("%m"))==12):
datum_tuer_heute = date(2023, 12, tuer_nummer)
if (date.today() - datum_tuer_heute).days >= 0:
await update.message.reply_document(document=GIF_LOCATION/ f"gif{tuer_nummer}.mp4", caption=f"Türchen für den {tuer_nummer}. Dezember: \n" + self.tuerchen_texte[tuerchen], reply_markup=reply_markup)
else:
await update.message.reply_sticker(sticker=STICKER_LOCATION/"stickerangry.tgs")