diff options
| author | 2020-03-23 16:46:17 +0100 | |
|---|---|---|
| committer | 2020-03-23 16:46:25 +0100 | |
| commit | 6491897e9330911ff1d39816c5a147fb8ee3b93b (patch) | |
| tree | 0d2d58ec0901d5f2ce53d444ec7d382954bea07b | |
| parent | Deseasonify: extend BrandingManager documentation (diff) | |
Deseasonify: remove `load_extensions` method
This is unused and no longer necessary, as all extensions load only
once: on start-up, in `__main__.py`.
| -rw-r--r-- | bot/bot.py | 20 | 
1 files changed, 1 insertions, 19 deletions
@@ -2,8 +2,7 @@ import asyncio  import contextlib  import logging  import socket -from traceback import format_exc -from typing import List, Optional +from typing import Optional  import async_timeout  import discord @@ -27,23 +26,6 @@ class SeasonalBot(commands.Bot):              connector=TCPConnector(resolver=AsyncResolver(), family=socket.AF_INET)          ) -    def load_extensions(self, exts: List[str]) -> None: -        """Unload all current extensions, then load the given extensions.""" -        # Unload all cogs -        extensions = list(self.extensions.keys()) -        for extension in extensions: -            if extension not in ["bot.branding", "bot.help"]:  # We shouldn't unload the manager and help. -                self.unload_extension(extension) - -        # Load in the list of cogs that was passed in here -        for extension in exts: -            cog = extension.split(".")[-1] -            try: -                self.load_extension(extension) -                log.info(f'Successfully loaded extension: {cog}') -            except Exception as e: -                log.error(f'Failed to load extension {cog}: {repr(e)} {format_exc()}') -      async def send_log(self, title: str, details: str = None, *, icon: str = None) -> None:          """Send an embed message to the devlog channel."""          devlog = self.get_channel(Channels.devlog)  |