From fc796768ba16c91a696f7a18ba93e5736d335026 Mon Sep 17 00:00:00 2001 From: kwzrd Date: Sun, 22 Mar 2020 16:49:11 +0100 Subject: Deseasonify: guard bot nickname setter Previously we'd always set the nickname, as the BaseSeason class provides a default. However, it feels cleaner to also guard this, in case a specific season decides to override the attr to something falsey. --- bot/branding.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bot/branding.py b/bot/branding.py index 683dce61..195d46a2 100644 --- a/bot/branding.py +++ b/bot/branding.py @@ -292,8 +292,9 @@ class BrandingManager(commands.Cog): # await self.bot.set_avatar(self.avatar.download_url) log.info(f"Applying avatar: {self.avatar.download_url}") - # await self.bot.set_nickname(self.current_season.bot_name) - log.info(f"Applying nickname: {self.current_season.bot_name}") + if self.current_season.bot_name: + # await self.bot.set_nickname(self.current_season.bot_name) + log.info(f"Applying nickname: {self.current_season.bot_name}") await self.cycle() -- cgit v1.2.3