fix(moderation): fixed metadata importing again

This commit is contained in:
Seaswimmer 2023-12-18 16:58:24 -05:00
parent 67836d034d
commit fe7193601b
Signed by untrusted user: cswimr
GPG key ID: 1EBC234EEDA901AE

View file

@ -1,5 +1,6 @@
from datetime import timedelta, datetime from datetime import timedelta, datetime
import json import json
from typing import Dict
from redbot.core import commands from redbot.core import commands
from discord import Message, ButtonStyle, Interaction, ui from discord import Message, ButtonStyle, Interaction, ui
from ..database import connect, create_guild_table, mysql_log from ..database import connect, create_guild_table, mysql_log
@ -63,10 +64,10 @@ class ImportModerationView(ui.View):
if "metadata" not in case: if "metadata" not in case:
metadata = {} metadata = {}
else: else:
metadata: dict = case["metadata"] metadata: Dict[str, any] = case["metadata"]
metadata.update({ metadata.update({
'imported_from': 'SeaCogs/Moderation' 'imported_from': 'SeaCogs/Moderation'
}) })
if case["duration"] != "NULL": if case["duration"] != "NULL":
hours, minutes, seconds = map(int, case["duration"].split(":")) hours, minutes, seconds = map(int, case["duration"].split(":"))