diff options
| author | 2020-05-22 11:47:55 +0100 | |
|---|---|---|
| committer | 2020-05-22 11:47:55 +0100 | |
| commit | 8d2e1dfb1611e15e52041bfc759cd007ed5f9b7a (patch) | |
| tree | e42897c65c9b34543830e8a4483a376563ab6bdd | |
| parent | Merge pull request #944 from Numerlor/eval-timeout-increase (diff) | |
| parent | Merge branch 'master' into python-news-stats (diff) | |
Merge pull request #942 from ks129/python-news-stats
| -rw-r--r-- | bot/cogs/python_news.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/bot/cogs/python_news.py b/bot/cogs/python_news.py index 57ce61638..d28af4a0b 100644 --- a/bot/cogs/python_news.py +++ b/bot/cogs/python_news.py @@ -109,6 +109,9 @@ class PythonNews(Cog): ) payload["data"]["pep"].append(pep_nr) + # Increase overall PEP new stat + self.bot.stats.incr("python_news.posted.pep") + if msg.channel.is_news(): log.trace("Publishing PEP annnouncement because it was in a news channel") await msg.publish() @@ -168,6 +171,9 @@ class PythonNews(Cog): ) payload["data"][maillist].append(thread_information["thread_id"]) + # Increase this specific maillist counter in stats + self.bot.stats.incr(f"python_news.posted.{maillist.replace('-', '_')}") + if msg.channel.is_news(): log.trace("Publishing mailing list message because it was in a news channel") await msg.publish() |