improved most_regex

This commit is contained in:
jsl12
2022-05-12 11:22:25 -05:00
parent b17b6aff9a
commit 477836bde2

View File

@@ -31,11 +31,7 @@ class Kwaylon(Client):
self.jokes = list(jokes.collect_jokes())
self.lock = asyncio.Lock()
self.most_regex = re.compile('^most\s+(?P<emoji>\S+)')
# self.leaderboard_regex = re.compile(
# '^most\s*?(?P<emoji>\S+?)\s*?(leaderboard|((?:.+?(?P<days>\d+) days)))',
# re.IGNORECASE
# )
self.most_regex = re.compile('^most\s*(?P<emoji>\S+)', re.IGNORECASE)
def text_channels(self) -> List[TextChannel]:
return [chan for chan in self.get_all_channels() if isinstance(chan, TextChannel)]