From 1feabd9103e09bac50cc284ca848d27397557cb8 Mon Sep 17 00:00:00 2001 From: aikaterna <20862007+aikaterna@users.noreply.github.com> Date: Mon, 27 Sep 2021 11:47:14 -0700 Subject: [PATCH] [ChatChart] Even more test logging --- chatchart/chatchart.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/chatchart/chatchart.py b/chatchart/chatchart.py index c605d8c..dcf135c 100644 --- a/chatchart/chatchart.py +++ b/chatchart/chatchart.py @@ -78,6 +78,11 @@ class Chatchart(commands.Cog): key=lambda x: x[1], ) others = 100 - sum(x[1] for x in top_twenty) + + if others < 0: + log.info(f"Others is less than zero: {others}") + log.info(f"Toptwenty is: {top_twenty}") + return top_twenty, others @staticmethod @@ -89,9 +94,6 @@ class Chatchart(commands.Cog): if s < 0: index = sizes.index(s) log.info(f"Size {s} is not valid, at position {top[index]}") - - if others < 0: - log.info(f"Others is less than zero: {others}") labels = ["{} {:g}%".format(x[0], x[1]) for x in top] if len(top) >= 20: