diff options
author | 2021-04-19 20:20:48 +0100 | |
---|---|---|
committer | 2021-04-19 20:20:48 +0100 | |
commit | 1ed857d9093481387720ac1dc4041a64a2c9c593 (patch) | |
tree | 909724207ba5493db3f0871a74efa1198d34fc59 /bot/exts/evergreen/connect_four.py | |
parent | Merge pull request #673 from janine9vn/int-eval (diff) |
chore: switch commands.Bot typehints to bot.bot's Bot
Diffstat (limited to 'bot/exts/evergreen/connect_four.py')
-rw-r--r-- | bot/exts/evergreen/connect_four.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/bot/exts/evergreen/connect_four.py b/bot/exts/evergreen/connect_four.py index 7e3ec42b..fbb13780 100644 --- a/bot/exts/evergreen/connect_four.py +++ b/bot/exts/evergreen/connect_four.py @@ -8,6 +8,7 @@ import emojis from discord.ext import commands from discord.ext.commands import guild_only +from bot.bot import Bot from bot.constants import Emojis NUMBERS = list(Emojis.number_emojis.values()) @@ -22,7 +23,7 @@ class Game: def __init__( self, - bot: commands.Bot, + bot: Bot, channel: discord.TextChannel, player1: discord.Member, player2: typing.Optional[discord.Member], @@ -180,7 +181,7 @@ class Game: class AI: """The Computer Player for Single-Player games.""" - def __init__(self, bot: commands.Bot, game: Game) -> None: + def __init__(self, bot: Bot, game: Game) -> None: self.game = game self.mention = bot.user.mention @@ -255,7 +256,7 @@ class AI: class ConnectFour(commands.Cog): """Connect Four. The Classic Vertical Four-in-a-row Game!""" - def __init__(self, bot: commands.Bot) -> None: + def __init__(self, bot: Bot) -> None: self.bot = bot self.games: typing.List[Game] = [] self.waiting: typing.List[discord.Member] = [] @@ -445,6 +446,6 @@ class ConnectFour(commands.Cog): await self._play_game(ctx, None, board_size, str(emoji1), str(emoji2)) -def setup(bot: commands.Bot) -> None: +def setup(bot: Bot) -> None: """Load ConnectFour Cog.""" bot.add_cog(ConnectFour(bot)) |