diff options
author | 2020-03-22 17:53:03 +0100 | |
---|---|---|
committer | 2020-03-22 17:53:03 +0100 | |
commit | 9fe6657732a106b35c9d9f222ee5ec841be66303 (patch) | |
tree | 3bbf53658264a188c08be63c6bdac006c11b0583 /bot | |
parent | Deseasonify: propagate success value of `set_icon` (diff) |
Deseasonify: uncomment API calls
Previously, all actual calls to the API were commented and replaced
by logging so that the API doesn't get spammed during development.
This is no longer necessary - we can begin using the cog!
Diffstat (limited to 'bot')
-rw-r--r-- | bot/branding.py | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/bot/branding.py b/bot/branding.py index e6ab44b5..c3a26b06 100644 --- a/bot/branding.py +++ b/bot/branding.py @@ -253,9 +253,9 @@ class BrandingManager(commands.Cog): # GithubFile instances carry a `sha` attr so this will pick up if a file changes branding_changed = old_branding != (self.banner, self.avatar, self.available_icons) - log.info(f"New branding detected: {branding_changed}") if branding_changed: + log.info(f"New branding detected (season: {self.current_season.season_name})") await self._reset_remaining_icons() await self._reset_should_cycle() @@ -276,9 +276,7 @@ class BrandingManager(commands.Cog): log.info(f"Set remaining icons: {await pretty_files(self.remaining_icons)}") next_up, *self.remaining_icons = self.remaining_icons - # success = await self.bot.set_icon(next_up.download_url) - log.info(f"Applying icon: {next_up}") - success = True # Default value during development + success = await self.bot.set_icon(next_up.download_url) return success @@ -290,16 +288,13 @@ class BrandingManager(commands.Cog): for available assets. Assets unavailable in the branding repo will be ignored. """ if self.banner is not None: - # await self.bot.set_banner(self.banner.download_url) - log.info(f"Applying banner: {self.banner.download_url}") + await self.bot.set_banner(self.banner.download_url) if self.avatar is not None: - # await self.bot.set_avatar(self.avatar.download_url) - log.info(f"Applying avatar: {self.avatar.download_url}") + await self.bot.set_avatar(self.avatar.download_url) 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.bot.set_nickname(self.current_season.bot_name) await self.cycle() |