aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar PureFunctor <[email protected]>2020-11-30 17:52:22 +0800
committerGravatar PureFunctor <[email protected]>2020-11-30 17:52:22 +0800
commitae976d56bd3ce89c1da69f42f59680f7b4763771 (patch)
treef098439ad63183e6b661b1a44920b24fb35b6fc2
parentRefactor flow for automatically adding punctuation (diff)
Remove unused get_latest_infraction helper method
-rw-r--r--bot/exts/moderation/infraction/management.py14
1 files changed, 0 insertions, 14 deletions
diff --git a/bot/exts/moderation/infraction/management.py b/bot/exts/moderation/infraction/management.py
index 10bca5fc5..3b0719ed2 100644
--- a/bot/exts/moderation/infraction/management.py
+++ b/bot/exts/moderation/infraction/management.py
@@ -310,20 +310,6 @@ class ModManagement(commands.Cog):
return lines.strip()
- async def get_latest_infraction(self, actor: int) -> t.Optional[dict]:
- """Obtains the latest infraction from an actor."""
- params = {
- "actor__id": actor,
- "ordering": "-inserted_at"
- }
-
- infractions = await self.bot.api_client.get("bot/infractions", params=params)
-
- if infractions:
- return infractions[0]
-
- return None
-
# endregion
# This cannot be static (must have a __func__ attribute).