diff --git a/edmond/plugins/misc_reactions.py b/edmond/plugins/misc_reactions.py index be8ab27..5b6c252 100644 --- a/edmond/plugins/misc_reactions.py +++ b/edmond/plugins/misc_reactions.py @@ -150,6 +150,14 @@ class MiscReactionsPlugin(Plugin): if len(words) == 0: return biggest_word = sorted(words, key=lambda w: len(w))[-1] + num_repeats = 2 + repeated = biggest_word[:num_repeats] + while ( + (not any(letter in repeated for letter in "aeiouy")) + and len(repeated) < len(biggest_word) + ): + num_repeats += 1 + repeated = biggest_word[:num_repeats] word = biggest_word[:2] + biggest_word question_mark = self.config["question_mark"] reply = f"{word}{question_mark}"