From efda13b9f07c4bd650d0c11baa0d3fbc06b1e35f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Ml=C3=A1dek?= Date: Wed, 25 Apr 2018 13:55:52 +0200 Subject: [PATCH] PRAS --- delojza.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/delojza.py b/delojza.py index cf92d9d..a9a9b55 100755 --- a/delojza.py +++ b/delojza.py @@ -93,8 +93,10 @@ def get_first_hashtag(message): list(filter(lambda e: e.type == 'hashtag', message.caption_entities)))) if len(hashtags) == 0: return None - hashtag = hashtags[0] - return hashtag[1:].upper() + hashtag = hashtags[0][1:].upper() + if "PRAS" in hashtag: + hashtag = "PRAS" + return hashtag # noinspection PyBroadException