From 184eb097a9c0c4e409638437eeac004316aea904 Mon Sep 17 00:00:00 2001 From: deathbybandaid Date: Fri, 6 May 2022 08:58:56 -0400 Subject: [PATCH] test --- spicebot_command_leetspeak/__init__.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/spicebot_command_leetspeak/__init__.py b/spicebot_command_leetspeak/__init__.py index 9990f66..3e5a5c2 100644 --- a/spicebot_command_leetspeak/__init__.py +++ b/spicebot_command_leetspeak/__init__.py @@ -48,10 +48,15 @@ def leet_convert(message): } leetspeak = [] + # Split by individual word for word in message.split(" "): + + # Attempt full word replacement if word.lower() in [old for old, new in replacements]: leet_word = word.replace([old for old, new in replacements][0], [new for old, new in replacements][0]) leetspeak.append(leet_word) + + # Replace indiviual characters else: word_chars = [] for char in word: