From a4a41ae2570ff5d2e49bceab2910df6b273f548a Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Tue, 2 Mar 2021 16:50:32 +0000 Subject: [PATCH] Replace emoji for speaker --- speaker.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/speaker.py b/speaker.py index 5c9ac3514..b7f239aa7 100644 --- a/speaker.py +++ b/speaker.py @@ -96,6 +96,10 @@ def speakerReplaceLinks(sayText: str, translate: {}, linkedStr = translate['Linked'] prevWord = '' for word in wordsList: + if word.startswith(':'): + if word.endswith(':'): + replacements[word] = ', emoji ' + word.replace(':', '') + ',' + continue # replace mentions, but not re-tweets if word.startswith('@') and not prevWord.endswith('RT'): replacements[word] = \