aboutsummaryrefslogtreecommitdiffstats
path: root/bot/exts/fun/minesweeper.py
diff options
context:
space:
mode:
Diffstat (limited to 'bot/exts/fun/minesweeper.py')
-rw-r--r--bot/exts/fun/minesweeper.py8
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))