diff options
author | 2020-03-22 16:49:11 +0100 | |
---|---|---|
committer | 2020-03-22 16:49:11 +0100 | |
commit | fc796768ba16c91a696f7a18ba93e5736d335026 (patch) | |
tree | faf74b48554756e3e0e022d1d5420dfa45bbc504 | |
parent | Deseasonify: do not automatically `apply` after `set` (diff) |
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.
-rw-r--r-- | bot/branding.py | 5 |
1 files 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() |