im logging you strawberry

This commit is contained in:
Nexus 2024-09-19 01:39:22 +01:00
parent 5f313c3f1d
commit ec43c7b9e8

View file

@ -46,6 +46,7 @@ class MemeteraCounter(niobot.NioBot):
for word, regex in self.WORDS.items():
word_count = len(regex.findall(lower_body))
if word_count:
self.log.info("June said %r %d times in %s!", word, word_count, event.event_id)
counts.setdefault(word, 0)
counts[word] += word_count
@ -55,6 +56,7 @@ class MemeteraCounter(niobot.NioBot):
stored = stored or 0
stored += count
await self.bot.redis.set(key, count)
self.log.info("June has now said %r %d times", word, stored)
@niobot.command(name="june-word-count", hidden=True)
async def june_word_count(