add update_badge_murderer() to Badges cog
@@ -127,6 +127,26 @@ class Badges(commands.Cog):
elif pillager_level < 1 and pillaged_emeralds >= 100:
await self.update_user_badges(user_id, pillager=1)
+ async def update_badge_murderer(self, user_id: int, murders: int) -> None:
+ # levels are:
+ # I -> 100 mobs cruelly genocided
+ # II -> 1000 mobs cruelly genocided
+ # III -> 100000 mobs cruelly genocided
+
+ badges = await self.fetch_user_badges(user_id)
+
+ murderer_level = badges["pillager"]
+
+ if murderer_level == 3:
+ return
+
+ if murderer_level < 3 and murders >= 100_000:
+ await self.update_user_badges(user_id, murders=3)
+ elif murderer_level < 2 and murders >= 1000:
+ await self.update_user_badges(user_id, murders=2)
+ elif murderer_level < 1 and murders >= 100:
+ await self.update_user_badges(user_id, murders=1)
+
