diff options
Diffstat (limited to 'bot/seasons')
| -rw-r--r-- | bot/seasons/__init__.py | 23 | ||||
| -rw-r--r-- | bot/seasons/season.py | 38 | 
2 files changed, 20 insertions, 41 deletions
| diff --git a/bot/seasons/__init__.py b/bot/seasons/__init__.py index af270901..1569f29a 100644 --- a/bot/seasons/__init__.py +++ b/bot/seasons/__init__.py @@ -1,9 +1,7 @@  import logging  import pkgutil  from pathlib import Path -from typing import List - -from bot.seasons.season import SeasonBase +from typing import List, Optional, Tuple  __all__ = ("SeasonBase", "get_seasons", "get_extensions") @@ -37,3 +35,22 @@ def get_extensions() -> List[str]:              extensions.append(f"bot.seasons.{package.name}.{module.name}")      return extensions + + +class SeasonBase: +    """Base for Seasonal classes.""" + +    name: Optional[str] = "evergreen" +    bot_name: str = "SeasonalBot" + +    start_date: Optional[str] = None +    end_date: Optional[str] = None +    should_announce: bool = False + +    colour: Optional[int] = None +    icon: Tuple[str, ...] = ("/logos/logo_full/logo_full.png",) +    bot_icon: Optional[str] = None + +    date_format: str = "%d/%m/%Y" + +    index: int = 0 diff --git a/bot/seasons/season.py b/bot/seasons/season.py deleted file mode 100644 index cc2c1251..00000000 --- a/bot/seasons/season.py +++ /dev/null @@ -1,38 +0,0 @@ -import contextlib -import datetime -import importlib -import inspect -import logging -import pkgutil -from pathlib import Path -from typing import List, Optional, Tuple, Type, Union - -import discord -from discord.ext import commands - -from bot.bot import bot -from bot.constants import Channels, Client, Roles -from bot.decorators import with_role - -log = logging.getLogger(__name__) - -ICON_BASE_URL = "https://raw.githubusercontent.com/python-discord/branding/master" - - -class SeasonBase: -    """Base class for Seasonal classes.""" - -    name: Optional[str] = "evergreen" -    bot_name: str = "SeasonalBot" - -    start_date: Optional[str] = None -    end_date: Optional[str] = None -    should_announce: bool = False - -    colour: Optional[int] = None -    icon: Tuple[str, ...] = ("/logos/logo_full/logo_full.png",) -    bot_icon: Optional[str] = None - -    date_format: str = "%d/%m/%Y" - -    index: int = 0 | 
