Compare commits

..

9 Commits

Author SHA1 Message Date
Zed
04df87f054 Fix white space 2023-03-02 17:58:10 -06:00
Zed
9a29e1a7fe Documentation 2023-03-02 17:53:33 -06:00
Zed
3300476757 Logging guesses 2023-03-02 17:53:20 -06:00
Zed
4f70e84749 Add clear class 2023-03-02 17:52:51 -06:00
Zed
e9154711c0 Removed add player guess to resolve 2023-03-02 17:52:40 -06:00
Zed
20cfcdcd4f Update help 2023-03-02 17:52:16 -06:00
Zed
e80f2ec820 Add clear command 2023-03-02 17:49:27 -06:00
Zed
c8b8319a55 Print logging to output 2023-03-02 17:49:16 -06:00
Zed
17774ae0e2 Add logging 2023-03-02 17:48:35 -06:00
3 changed files with 6 additions and 5 deletions

View File

@@ -18,13 +18,14 @@ class ClearManager(BaseGameManager):
async def clear(self):
"""Clear command - Clears the session scoreboard"""
players = Player.select(Player.player_id, Player.total_points)
players = Player.select(Player.total_points)
for player in players:
player.total_points = 0
Player.bulk_update(players, fields=[Player.total_points])
Player.bulk_update(players, Player.total_points)
clear_message = "The score has been cleared!"
await self.message.channel.send(clear_message)
recipient = await self.discord.fetch_user(self.message.author.id)
await recipient.send(clear_message)

View File

@@ -13,7 +13,7 @@ class NewGameManager(BaseGameManager):
def __init__(self):
super().__init__()
self.commands.append(("bb", self.start))
self.commands.append(("braveball", self.start))
async def start(self):
"""

View File

@@ -27,7 +27,7 @@ class PointsManager(BaseGameManager):
players = Player.select(
Player.player_name, Player.total_points, Player.last_update
).order_by(Player.total_points.desc())
).order_by(Player.last_update.desc(), Player.total_points.desc())
for player in players:
message += (