Queer European MD passionate about IT
Browse Source

Return suspended service message during COVID-19 emergency

Davte 4 years ago
parent
commit
9d7abf725a
1 changed files with 9 additions and 0 deletions
  1. 9 0
      ciclopibot/ciclopi.py

+ 9 - 0
ciclopibot/ciclopi.py

@@ -571,6 +571,15 @@ async def cancel_ciclopi_location(bot, update, user_record):
 
 
 async def _ciclopi_command(bot: davtelepot.bot.Bot, update, user_record, sent_message=None,
 async def _ciclopi_command(bot: davtelepot.bot.Bot, update, user_record, sent_message=None,
                            show_all=False):
                            show_all=False):
+    if datetime.datetime.now() < datetime.datetime(year=2020, month=4, day=13):
+        return {
+            'text': {
+                'it': "⚠️ Il servizio è momentaneamente sospeso a causa dell'emergenza COVID-19🦠\n"
+                      "#stiamoacasa 🏠",
+                'en': "⚠️ The service is currently suspended due to COVID-19 emergency.🦠\n"
+                      "#stayathome 🏠"
+            }
+        }
     chat_id = update['chat']['id']
     chat_id = update['chat']['id']
     default_stations_to_show = 5
     default_stations_to_show = 5
     stations = []
     stations = []