async def setup(bot: Red) -> None: cog = PermissionsLocker(bot) await cog.initialize() bot.add_cog(cog) bot.before_invoke(before_invoke_hook)
async def setup(cls, bot: Red): c = cls(bot) bot.add_cog(c) bot.add_check(c.custom_check_once, call_once=True) bot.before_invoke(c.custom_before_invoke) c.loop_task = asyncio.create_task(c.bg_loop())
async def setup(bot: Red) -> None: bot.add_cog(PermissionsLocker(bot)) bot.before_invoke(before_invoke_hook)
def setup(bot: Red): bot.before_invoke(before_hook)