title: How could i revert the guild vanity url?
body: <p>So I own a 10k discord server and receantly our server vainty was stolen, so i'm working on something to revert the vainty back to whatever it was last.</p>
  <p>My code is</p>
  <pre><code>async def on_guild_update(before, after):
      guild = after
          if after.name == before.name:
               return
          elif after.name != before.name:
              bname = before.name
              await guild.edit(name=bname)
          elif after.vanity_code != before.vanity_code:
              code = before.vanity_code
              await guild.edit(vanity_code=code)
          except Exception as e:
              print(e)
  </code></pre>
  <p>But it doesn't work, I don't even get an error. And suggestions on what's wrong?</p>