diff --git a/payphone/cogs/admin/cog.py b/payphone/cogs/admin/cog.py index 8856fb5..f424f6e 100644 --- a/payphone/cogs/admin/cog.py +++ b/payphone/cogs/admin/cog.py @@ -98,11 +98,16 @@ class Admin(base.Cog): after (discord.Guild): The server after it being updated. """ - vanity = await after.vanity_invite() vanity_code = None - if vanity is not None: - vanity_code = vanity.code + try: + vanity = await after.vanity_invite() + + if vanity is not None: + vanity_code = vanity.code + + except errors.DiscordException: + pass await models.Server.update_or_create( {"name": after.name, "vanity_code": vanity_code}, id=after.id