diff --git a/autoficher.py b/autoficher.py index 77b32d9..04d095b 100755 --- a/autoficher.py +++ b/autoficher.py @@ -161,12 +161,16 @@ class AutoFicher(): else: time = datetime.now().astimezone(pytz.timezone("Europe/Madrid")).strftime("%H:%M") - rtext = 'fichado' - remoji = "🏡🏃‍♂️🏢🕐" + conditional_response = { + "text": "fichado", + "emoji": "🕐🏢🏃‍♂️🏡" + } if typ: - rtext = 'desfichado' - remoji = "🕐🏢🏃‍♂️🏡" - self.sendReport('%s Has %s correctamente a las %s' % (remoji, rtext, time)) + conditional_response = { + "text": "desfichado", + "emoji": "🏡🏃‍♂️🏢🕐" + } + self.sendReport('%s Has %s correctamente a las %s' % (conditional_response['emoji'], conditional_response['text'], time)) else: self.sendReport("🟥🕐 No se ha podido fichar, la web no ha devuelto 200 OK")