fix(aurora): updated the aurora importer to have all of the currently implemented moderation types
All checks were successful
Actions / Build Documentation (MkDocs) (push) Successful in 33s
Actions / Lint Code (Ruff & Pylint) (push) Successful in 46s
Actions / Build Documentation (MkDocs) (pull_request) Successful in 31s
Actions / Lint Code (Ruff & Pylint) (pull_request) Successful in 43s

This commit is contained in:
Seaswimmer 2024-05-04 12:57:27 -04:00
parent 99c20c6054
commit c618f9be72
Signed by: cswimr
GPG key ID: 5D671B5D03D65A7F

View file

@ -43,7 +43,7 @@ class ImportAuroraView(ui.View):
file = await self.ctx.message.attachments[0].read()
data: list[dict] = sorted(json.loads(file), key=lambda x: x["moderation_id"])
user_mod_types = ["NOTE", "WARN", "MUTE", "UNMUTE", "KICK", "BAN", "UNBAN"]
user_mod_types = ["NOTE", "WARN", "ADDROLE", "REMOVEROLE", "MUTE", "UNMUTE", "KICK", "TEMPBAN", "BAN", "UNBAN"]
channel_mod_types = ["SLOWMODE", "LOCKDOWN"]
@ -58,6 +58,8 @@ class ImportAuroraView(ui.View):
case["target_type"] = "USER"
elif case["moderation_type"] in channel_mod_types:
case["target_type"] = "CHANNEL"
else:
case["target_type"] = "USER"
if "role_id" not in case or not case["role_id"]:
case["role_id"] = 0