fix(aurora): updated the aurora importer to have all of the currently implemented moderation types
This commit is contained in:
parent
99c20c6054
commit
c618f9be72
1 changed files with 3 additions and 1 deletions
|
@ -43,7 +43,7 @@ class ImportAuroraView(ui.View):
|
||||||
file = await self.ctx.message.attachments[0].read()
|
file = await self.ctx.message.attachments[0].read()
|
||||||
data: list[dict] = sorted(json.loads(file), key=lambda x: x["moderation_id"])
|
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"]
|
channel_mod_types = ["SLOWMODE", "LOCKDOWN"]
|
||||||
|
|
||||||
|
@ -58,6 +58,8 @@ class ImportAuroraView(ui.View):
|
||||||
case["target_type"] = "USER"
|
case["target_type"] = "USER"
|
||||||
elif case["moderation_type"] in channel_mod_types:
|
elif case["moderation_type"] in channel_mod_types:
|
||||||
case["target_type"] = "CHANNEL"
|
case["target_type"] = "CHANNEL"
|
||||||
|
else:
|
||||||
|
case["target_type"] = "USER"
|
||||||
|
|
||||||
if "role_id" not in case or not case["role_id"]:
|
if "role_id" not in case or not case["role_id"]:
|
||||||
case["role_id"] = 0
|
case["role_id"] = 0
|
||||||
|
|
Loading…
Reference in a new issue