Owner.py 文件源码

python
阅读 29 收藏 0 点赞 0 评论 0

项目:youtube 作者: FishyFing 项目源码 文件源码
def load(self, *, cog_name: str):
        """Loads a module
        Example: load mod"""
        module = cog_name.strip()
        if "modules." not in module:
            module = "modules." + module
        try:
            self._load_cog(module)
        except CogNotFoundError:
            await ctx.send("That cog could not be found.")
        except CogLoadError as e:
            logger.exception(e)
            traceback.print_exc()
            await ctx.send("There was an issue loading the cog. Check"
                           " your console or logs for more information.")
        except Exception as e:
            logger.exception(e)
            traceback.print_exc()
            await ctx.send('Cog was found and possibly loaded but '
                           'something went wrong. Check your console '
                           'or logs for more information.')
        else:
            set_cog(module, True)
            await self.disable_commands()
            await ctx.send("The cog has been loaded.")
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号