aboutsummaryrefslogtreecommitdiffstats
path: root/bot/bot.py
diff options
context:
space:
mode:
authorGravatar kwzrd <[email protected]>2020-03-31 16:22:10 +0200
committerGravatar kwzrd <[email protected]>2020-03-31 16:22:10 +0200
commit2b9c64466026c40f7f2430c80cb47d67dda0756d (patch)
treece874898801e42ad11e43757795d09a9371d8627 /bot/bot.py
parentRefactor: capitalize Month enum members (diff)
Refactor: capitalize AssetType enum members
Co-authored-by: MarkKoz <[email protected]>
Diffstat (limited to 'bot/bot.py')
-rw-r--r--bot/bot.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/bot/bot.py b/bot/bot.py
index 81b49386..87575fde 100644
--- a/bot/bot.py
+++ b/bot/bot.py
@@ -25,9 +25,9 @@ class AssetType(enum.Enum):
The values match exactly the kwarg keys that can be passed to `Guild.edit` or `User.edit`.
"""
- banner = "banner"
- avatar = "avatar"
- server_icon = "icon"
+ BANNER = "banner"
+ AVATAR = "avatar"
+ SERVER_ICON = "icon"
class SeasonalBot(commands.Bot):
@@ -111,7 +111,7 @@ class SeasonalBot(commands.Bot):
log.info("Failed to get guild instance, aborting asset upload")
return False
- return await self._apply_asset(guild, AssetType.banner, url)
+ return await self._apply_asset(guild, AssetType.BANNER, url)
@mock_in_debug(return_value=True)
async def set_icon(self, url: str) -> bool:
@@ -121,12 +121,12 @@ class SeasonalBot(commands.Bot):
log.info("Failed to get guild instance, aborting asset upload")
return False
- return await self._apply_asset(guild, AssetType.server_icon, url)
+ return await self._apply_asset(guild, AssetType.SERVER_ICON, url)
@mock_in_debug(return_value=True)
async def set_avatar(self, url: str) -> bool:
"""Set the bot's avatar to image at `url`."""
- return await self._apply_asset(self.user, AssetType.avatar, url)
+ return await self._apply_asset(self.user, AssetType.AVATAR, url)
@mock_in_debug(return_value=True)
async def set_nickname(self, new_name: str) -> bool: