title: Discord.py ctx.guild.edit works but not self.bot.guild.edit?
body: <p>Like the title says,
  I'm trying to do guild edits but on an events.
  Here's part of my code:</p>
  
  <pre><code>    @commands.guild_only()
      async def on_ready(self):
      server = self.bot.get_guild("serverid")
          while True:
              await self.bot.guild.edit(guild=server, name="foo")
              await asyncio.sleep(1)
              await self.bot.guild.edit(guild=server, name="bar")
              await asyncio.sleep(1)
  </code></pre>
  
  <p>I've already tested it with a standalone command, so I know that ctx.guild.edit works but I'm not sure how to get it to work in an event.</p>