src/bot.py
def load_exts(self) -> None:
        """Loads needed extensions in the cogs folder"""
        for filename in os.listdir(".\src\cogs"):
            if filename.endswith('.py'):
                try:
                    self.load_extension(f"cogs.{filename[:-3]}")

                except ExtensionNotFound:
                    logger.fatal("The extension could not be imported. This is also raised if the name of the extension could not be resolved using the provided package parameter.")

                except ExtensionAlreadyLoaded:
                    logger.fatal("The extension is already loaded.")

                except NoEntryPointError:
                    logger.fatal("The extension does not have a setup function.")

                except ExtensionFailed:
                    logger.fatal("The extension or its setup function had an execution error.")
Loads needed extensions in the cogs folder
Loads needed extensions in the cogs folder
Loads needed extensions in the cogs folder
def load_exts(self) -> None:
        for filename in os.listdir(".\src\cogs"):
            if filename.endswith('.py'):
                try:
                    self.load_extension(f"cogs.{filename[:-3]}")
                except ExtensionNotFound:
                    logger.fatal("The extension could not be imported. This is also raised if the name of the extension could not be resolved using the provided package parameter.")
                except ExtensionAlreadyLoaded:
                    logger.fatal("The extension is already loaded.")
                except NoEntryPointError:
                    logger.fatal("The extension does not have a setup function.")
                except ExtensionFailed:
                    logger.fatal("The extension or its setup function had an execution error.")
def load_exts ( self ) -> None : for filename in os . listdir ( ".\src\cogs" ) : if filename . endswith ( '.py' ) : try : self . load_extension ( f"cogs.{filename[:-3]}" ) except ExtensionNotFound : logger . fatal ( "The extension could not be imported. This is also raised if the name of the extension could not be resolved using the provided package parameter." ) except ExtensionAlreadyLoaded : logger . fatal ( "The extension is already loaded." ) except NoEntryPointError : logger . fatal ( "The extension does not have a setup function." ) except ExtensionFailed : logger . fatal ( "The extension or its setup function had an execution error." )
Loads needed extensions in the cogs folder
Loads needed extensions in the cogs folder
"""Loads needed extensions in the cogs folder"""
self