im logging you strawberry
This commit is contained in:
parent
5f313c3f1d
commit
ec43c7b9e8
1 changed files with 2 additions and 0 deletions
|
@ -46,6 +46,7 @@ class MemeteraCounter(niobot.NioBot):
|
||||||
for word, regex in self.WORDS.items():
|
for word, regex in self.WORDS.items():
|
||||||
word_count = len(regex.findall(lower_body))
|
word_count = len(regex.findall(lower_body))
|
||||||
if word_count:
|
if word_count:
|
||||||
|
self.log.info("June said %r %d times in %s!", word, word_count, event.event_id)
|
||||||
counts.setdefault(word, 0)
|
counts.setdefault(word, 0)
|
||||||
counts[word] += word_count
|
counts[word] += word_count
|
||||||
|
|
||||||
|
@ -55,6 +56,7 @@ class MemeteraCounter(niobot.NioBot):
|
||||||
stored = stored or 0
|
stored = stored or 0
|
||||||
stored += count
|
stored += count
|
||||||
await self.bot.redis.set(key, 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)
|
@niobot.command(name="june-word-count", hidden=True)
|
||||||
async def june_word_count(
|
async def june_word_count(
|
||||||
|
|
Loading…
Reference in a new issue