diff options
| author | 2020-05-16 17:13:54 +0300 | |
|---|---|---|
| committer | 2020-05-16 17:13:54 +0300 | |
| commit | 158e19a6fcb2056c6bcc244a1f02d8b75d7fe503 (patch) | |
| tree | 6fe76ba3fbc78705de18d6692fee93da52e4dc8f | |
| parent | Stats: Added codeblock correction stats (diff) | |
Stats: Added stats for eval successes + fails
| -rw-r--r-- | bot/cogs/snekbox.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/bot/cogs/snekbox.py b/bot/cogs/snekbox.py index 8d4688114..1c64c893b 100644 --- a/bot/cogs/snekbox.py +++ b/bot/cogs/snekbox.py @@ -205,6 +205,12 @@ class Snekbox(Cog): if paste_link: msg = f"{msg}\nFull output: {paste_link}" + # Collect stats of eval fails + successes + if icon == ":x:": + self.bot.stats.incr("evals.fail") + elif icon in (":warning:", ":white_check_mark:"): + self.bot.stats.incr("evals.success") + response = await ctx.send(msg) self.bot.loop.create_task( wait_for_deletion(response, user_ids=(ctx.author.id,), client=ctx.bot) |