From 27327825fe7f840e2326721e4cc12261c89f1805 Mon Sep 17 00:00:00 2001 From: kwzrd Date: Sun, 29 Mar 2020 14:45:52 +0200 Subject: Deseasonify: use `self` rather than local `bot` instance var --- bot/bot.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'bot/bot.py') diff --git a/bot/bot.py b/bot/bot.py index 00cc6e31..81b49386 100644 --- a/bot/bot.py +++ b/bot/bot.py @@ -48,7 +48,7 @@ class SeasonalBot(commands.Bot): @property def member(self) -> Optional[discord.Member]: """Retrieves the guild member object for the bot.""" - guild = bot.get_guild(Client.guild) + guild = self.get_guild(Client.guild) if not guild: return None return guild.me @@ -106,7 +106,7 @@ class SeasonalBot(commands.Bot): @mock_in_debug(return_value=True) async def set_banner(self, url: str) -> bool: """Set the guild's banner to image at `url`.""" - guild = bot.get_guild(Client.guild) + guild = self.get_guild(Client.guild) if guild is None: log.info("Failed to get guild instance, aborting asset upload") return False @@ -116,7 +116,7 @@ class SeasonalBot(commands.Bot): @mock_in_debug(return_value=True) async def set_icon(self, url: str) -> bool: """Sets the guild's icon to image at `url`.""" - guild = bot.get_guild(Client.guild) + guild = self.get_guild(Client.guild) if guild is None: log.info("Failed to get guild instance, aborting asset upload") return False -- cgit v1.2.3