countdown-bot

A Discord bot that runs countdown games and generates analytics
git clone https://git.ashermorgan.net/countdown-bot/
Log | Files | Refs | README

commit 7763ae9a94e123e8b039ab368a4ff9580ceac1e7
parent 682c6e206ca03e05d8ced165c576f80d9ed7cfa1
Author: AsherMorgan <59518073+AsherMorgan@users.noreply.github.com>
Date:   Tue, 16 Feb 2021 09:14:05 -0800

Add contribution percentage to leaderboard output

Diffstat:
Mbot.py | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/bot.py b/bot.py @@ -884,7 +884,7 @@ async def leaderboard(ctx, user=None): embed.description += f"**User:** <@{leaderboard[rank]['author']}>\n" embed.description += f"**Rank:** #{rank + 1:,}\n" embed.description += f"**Total Points:** {leaderboard[rank]['points']:,}\n" - embed.description += f"**Total Contributions:** {leaderboard[rank]['contributions']:,}\n" + embed.description += f"**Total Contributions:** {leaderboard[rank]['contributions']:,} *({round(leaderboard[rank]['contributions'] / len(channel['countdown'].messages) * 100, 1)}%)*\n" # Add points breakdown rules = ""