From d7e278ebf34aa127a37ebfb05dff15467f087fdc Mon Sep 17 00:00:00 2001 From: Iuri Guilherme <2027447+iuriguilherme@users.noreply.github.com> Date: Tue, 16 Nov 2021 23:49:42 -0300 Subject: [PATCH 1/3] We shall not divide by zero --- simple_commands.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/simple_commands.py b/simple_commands.py index ee6bf85..4c8979f 100644 --- a/simple_commands.py +++ b/simple_commands.py @@ -126,7 +126,7 @@ def stats(bot, update): ) n = us.first_places - m = round((us.first_places / us.games_played) * 100) + m = round((us.first_places / us.games_played) * 100) if games_played else 0 stats_text.append( _("{number} first place ({percent}%)", "{number} first places ({percent}%)", From 2cb72d45f9312e695f76b97b4059df8c91062cc2 Mon Sep 17 00:00:00 2001 From: Iuri Guilherme <2027447+iuriguilherme@users.noreply.github.com> Date: Tue, 16 Nov 2021 23:51:41 -0300 Subject: [PATCH 2/3] I break and I fix --- AUTHORS.md | 1 + 1 file changed, 1 insertion(+) diff --git a/AUTHORS.md b/AUTHORS.md index 5af7b3d..adb808f 100644 --- a/AUTHORS.md +++ b/AUTHORS.md @@ -7,6 +7,7 @@ The following wonderful people contributed directly or indirectly to this project: - [imlonghao](https://github.com/imlonghao) +- [Iuri Guilherme](https://github.com/iuriguilherme) - [pan93412](https://github.com/pan93412) - [qubitnerd](https://github.com/qubitnerd) - [SYHGroup](https://github.com/SYHGroup) From ea26cbe4c509bbc98fcdbcd74f28d90b3eb1b152 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jannes=20H=C3=B6ke?= Date: Wed, 17 Nov 2021 12:33:46 +0100 Subject: [PATCH 3/3] Fix check for games played --- simple_commands.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/simple_commands.py b/simple_commands.py index 4c8979f..002f9ca 100644 --- a/simple_commands.py +++ b/simple_commands.py @@ -126,7 +126,7 @@ def stats(bot, update): ) n = us.first_places - m = round((us.first_places / us.games_played) * 100) if games_played else 0 + m = round((us.first_places / us.games_played) * 100) if us.games_played else 0 stats_text.append( _("{number} first place ({percent}%)", "{number} first places ({percent}%)",