diff --git a/docs/guide_cog_creation.rst b/docs/guide_cog_creation.rst index 1c4de0210..11d724f9a 100644 --- a/docs/guide_cog_creation.rst +++ b/docs/guide_cog_creation.rst @@ -86,6 +86,9 @@ In that file, place the following code: class MyCog(commands.Cog): """My custom cog""" + def __init__(self, bot): + self.bot = bot + @commands.command() async def mycom(self, ctx): """This does stuff!""" @@ -100,7 +103,7 @@ Open :code:`__init__.py`. In that file, place the following: def setup(bot): - bot.add_cog(MyCog()) + bot.add_cog(MyCog(bot)) Make sure that both files are saved.