Compare commits
9 Commits
main
...
04df87f054
Author | SHA1 | Date | |
---|---|---|---|
04df87f054 | |||
9a29e1a7fe | |||
3300476757 | |||
4f70e84749 | |||
e9154711c0 | |||
20cfcdcd4f | |||
e80f2ec820 | |||
c8b8319a55 | |||
17774ae0e2 |
@@ -18,13 +18,14 @@ class ClearManager(BaseGameManager):
|
|||||||
async def clear(self):
|
async def clear(self):
|
||||||
"""Clear command - Clears the session scoreboard"""
|
"""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:
|
for player in players:
|
||||||
player.total_points = 0
|
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!"
|
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)
|
||||||
|
@@ -13,7 +13,7 @@ class NewGameManager(BaseGameManager):
|
|||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
super().__init__()
|
super().__init__()
|
||||||
self.commands.append(("bb", self.start))
|
self.commands.append(("braveball", self.start))
|
||||||
|
|
||||||
async def start(self):
|
async def start(self):
|
||||||
"""
|
"""
|
||||||
|
@@ -27,7 +27,7 @@ class PointsManager(BaseGameManager):
|
|||||||
|
|
||||||
players = Player.select(
|
players = Player.select(
|
||||||
Player.player_name, Player.total_points, Player.last_update
|
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:
|
for player in players:
|
||||||
message += (
|
message += (
|
||||||
|
Reference in New Issue
Block a user