title: Discord.py task.loop used to change the status in a cog not working
body: <pre><code>import discord
  from discord.ext import commands, tasks
  
  from itertools import cycle
  
  status = cycle(['status 1', 'status 2', 'status 3'])
  
  class Example(commands.Cog):
  
  
      def __init__(self, dBot):
          self.dBot = dBot
          self.dBot.change_stats.start()
  
      #EVENTS
      @commands.Cog.listener()
      async def on_member_join(self, context, member):
          await context.send(f'Member {member.mention} has joined!')
  
      #TASKS
      @tasks.loop(seconds=10.0)
      async def change_stats(self):
          await self.dBot.change_presence(activity=discord.Game(next(status)))
  
      #COMMANDS
      @commands.command()
      async def ping(self, context):
          await context.send("Pong!")
  
      @commands.command()
      async def clear(self, context, amount=5):
          await context.channel.purge(limit=amount)
  
  def setup(dBot):
      dBot.add_cog(Example(dBot))
  </code></pre>
  
  <p>This is the code above in the cog file where the task is not working correctly, everything else works fine apart from this.</p>
  
  <p>The error that i keep getting is "AttributeError: 'Bot' object has no attribute 'change_stats'"</p>
  
  <p>Any help is appreciated, thanks.</p>