update ban cache only in else clause after try except
@@ -396,7 +396,7 @@ class Useful(commands.Cog):
asyncio.create_task(update_ban_cache())
except Exception:
bans = "unknown"
-
+ else:
if bans > 500:
self.ban_count_cache[ctx.guild.id] = BanCacheEntry(bans)
else:
