diff options
| author | 2022-08-23 20:46:14 +0100 | |
|---|---|---|
| committer | 2022-09-21 23:02:55 +0100 | |
| commit | cc2dcdcdbf9e6057053bdb72bba848f4c2e19cbd (patch) | |
| tree | 75c87793362d786bb2c45fea8fb235435e44c315 /bot/exts/fun/minesweeper.py | |
| parent | Move startup checks and logs to their own cog (diff) | |
Use extension utils from bot-core
Diffstat (limited to '')
| -rw-r--r-- | bot/exts/fun/minesweeper.py | 8 | 
1 files changed, 4 insertions, 4 deletions
| diff --git a/bot/exts/fun/minesweeper.py b/bot/exts/fun/minesweeper.py index a48b5051..782fb9d8 100644 --- a/bot/exts/fun/minesweeper.py +++ b/bot/exts/fun/minesweeper.py @@ -11,7 +11,6 @@ from bot.bot import Bot  from bot.constants import Client  from bot.utils.converters import CoordinateConverter  from bot.utils.exceptions import UserNotPlayingError -from bot.utils.extensions import invoke_help_command  MESSAGE_MAPPING = {      0: ":stop_button:", @@ -51,13 +50,14 @@ class Game:  class Minesweeper(commands.Cog):      """Play a game of Minesweeper.""" -    def __init__(self): +    def __init__(self, bot: Bot): +        self.bot = bot          self.games: dict[int, Game] = {}      @commands.group(name="minesweeper", aliases=("ms",), invoke_without_command=True)      async def minesweeper_group(self, ctx: commands.Context) -> None:          """Commands for Playing Minesweeper.""" -        await invoke_help_command(ctx) +        await self.bot.invoke_help_command(ctx)      @staticmethod      def get_neighbours(x: int, y: int) -> Iterator[tuple[int, int]]: @@ -267,4 +267,4 @@ class Minesweeper(commands.Cog):  def setup(bot: Bot) -> None:      """Load the Minesweeper cog.""" -    bot.add_cog(Minesweeper()) +    bot.add_cog(Minesweeper(bot)) | 
