Compare commits

..

1 Commits

Author SHA1 Message Date
Zed
3525ea42e1 Jack's Changes (#1)
First merge after adding branch

Co-authored-by: c0de <c0de@c0de.dev>
Reviewed-on: c0de/BaseballBot#1
Co-authored-by: Zed <benolken5@gmail.com>
Co-committed-by: Zed <benolken5@gmail.com>
2024-04-23 22:19:20 +00:00
3 changed files with 5 additions and 6 deletions

View File

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

View File

@@ -13,7 +13,7 @@ class NewGameManager(BaseGameManager):
def __init__(self):
super().__init__()
self.commands.append(("braveball", self.start))
self.commands.append(("bb", 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.last_update.desc(), Player.total_points.desc())
).order_by(Player.total_points.desc())
for player in players:
message += (