This commit is contained in:
Tomáš Mládek 2018-04-25 13:55:52 +02:00 committed by Tomáš Mládek
parent fe6479c7ff
commit efda13b9f0

View file

@ -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