BaseballBot/game/reset.py
2022-12-09 23:20:20 -06:00

23 lines
661 B
Python

#!/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
from database.models import GuessModel as Guess
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):
"""Reset command purges all guesses"""
Guess.delete().where(True).execute()
return await self.message.channel.send("ok")