From cb5870235be303f2a4aaffb9f26a42f06da32a97 Mon Sep 17 00:00:00 2001 From: kwzrd Date: Sun, 29 Mar 2020 14:26:28 +0200 Subject: Deseasonify: add AssetType enum --- bot/bot.py | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'bot/bot.py') diff --git a/bot/bot.py b/bot/bot.py index b9ebb7f2..76ce5607 100644 --- a/bot/bot.py +++ b/bot/bot.py @@ -1,5 +1,5 @@ import asyncio -import contextlib +import enum import logging import socket from typing import Optional @@ -15,7 +15,19 @@ from bot.utils.decorators import mock_in_debug log = logging.getLogger(__name__) -__all__ = ('SeasonalBot', 'bot') +__all__ = ("AssetType", "SeasonalBot", "bot") + + +class AssetType(enum.Enum): + """ + Discord media assets. + + The values match exactly the kwarg keys that can be passed to `Guild.edit` or `User.edit`. + """ + + banner = "banner" + avatar = "avatar" + server_icon = "icon" class SeasonalBot(commands.Bot): -- cgit v1.2.3