diff options
author | 2021-04-20 13:05:03 -0400 | |
---|---|---|
committer | 2021-04-20 13:05:03 -0400 | |
commit | 5f889e4d3f0712c0005dbbc7c3ee820cc786ec30 (patch) | |
tree | 0d4f9ca18f5d7d132e846adb702a8bc71110b139 | |
parent | chore: lower the input to fine more cats (diff) |
fix: Use name.replace not text.replace
-rw-r--r-- | bot/exts/evergreen/catify.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/bot/exts/evergreen/catify.py b/bot/exts/evergreen/catify.py index 262c75bd..88c63202 100644 --- a/bot/exts/evergreen/catify.py +++ b/bot/exts/evergreen/catify.py @@ -53,11 +53,11 @@ class Catify(commands.Cog): string_list = text.split() for index, name in enumerate(string_list): name = name.lower() - if "cat" in text: + if "cat" in name: if random.randint(0, 5) == 5: - string_list[index] = text.replace("cat", f"**{random.choice(Cats.cats)}**") + string_list[index] = name.replace("cat", f"**{random.choice(Cats.cats)}**") else: - string_list[index] = text.replace("cat", random.choice(Cats.cats)) + string_list[index] = name.replace("cat", random.choice(Cats.cats)) for element in Cats.cats: if element in name: string_list[index] = name.replace(element, "cat") |