diff options
author | 2020-03-22 18:52:16 +0100 | |
---|---|---|
committer | 2020-03-22 18:52:16 +0100 | |
commit | 342fdbf2bb87180f9e012a1e464fd24a105e6185 (patch) | |
tree | 55e4780572041972ae955d16d265c1e25b63f637 /bot/branding.py | |
parent | Deseasonify: load bool env var properly (diff) |
Deseasonify: improve response messages
All responses now come in the form of an embed. When we fail to apply
assets, the list of failed assets is shown to the user.
Diffstat (limited to 'bot/branding.py')
-rw-r--r-- | bot/branding.py | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/bot/branding.py b/bot/branding.py index 6abcea61..9b5d96e3 100644 --- a/bot/branding.py +++ b/bot/branding.py @@ -333,14 +333,27 @@ class BrandingManager(commands.Cog): """Force cycle guild icon.""" async with ctx.typing(): success = await self.cycle() - await ctx.send("Icon cycle successful" if success else "Icon cycle failed") + if success: + response = discord.Embed(description=f"Success {Emojis.ok_hand}", colour=Colours.soft_green) + else: + response = discord.Embed(description=f"Failed", colour=Colours.soft_red) + await ctx.send(embed=response) @branding_cmds.command(name="apply") async def branding_apply(self, ctx: commands.Context) -> None: """Force apply current branding.""" async with ctx.typing(): - await self.apply() - await ctx.send("Branding applied") + failed_assets = await self.apply() + if failed_assets: + response = discord.Embed( + description=f"Failed to apply following assets: {', '.join(failed_assets)}", + colour=Colours.soft_red, + ) + else: + response = discord.Embed( + description=f"All assets applied successfully {Emojis.ok_hand}", colour=Colours.soft_green + ) + await ctx.send(embed=response) @branding_cmds.command(name="set") async def branding_set(self, ctx: commands.Context, *, season_name: t.Optional[str] = None) -> None: |