2022-12-10 05:20:20 +00:00
|
|
|
#!/usr/bin/env python3
|
|
|
|
# Copyright 2022 - c0de <c0de@c0de.dev>
|
|
|
|
# Licensed under the MIT License (https://opensource.org/licenses/MIT)
|
|
|
|
|
|
|
|
# pylint: disable=missing-module-docstring,too-few-public-methods
|
|
|
|
|
2022-12-10 18:31:19 +00:00
|
|
|
from database.models import PlayerModel as Player
|
2022-12-10 05:20:20 +00:00
|
|
|
from game.base import BaseGameManager
|
|
|
|
|
|
|
|
|
|
|
|
class ResetManager(BaseGameManager):
|
|
|
|
"""Commands that run when a player asks for help"""
|
|
|
|
|
|
|
|
def __init__(self):
|
|
|
|
super().__init__()
|
|
|
|
self.commands.append(("reset", self.reset))
|
|
|
|
|
|
|
|
async def reset(self):
|
2022-12-10 18:31:19 +00:00
|
|
|
"""Reset command purges all players (removes total points)"""
|
|
|
|
Player.delete().where(True).execute()
|
2022-12-10 05:20:20 +00:00
|
|
|
|
|
|
|
return await self.message.channel.send("ok")
|