WIP: Refactor Aurora (3.0.0) #29

Draft
cswimr wants to merge 347 commits from aurora-pydantic into main
Showing only changes of commit 3d3036f9b6 - Show all commits

View file

@ -37,7 +37,7 @@ from .utilities.config import config, register_config
from .utilities.factory import addrole_embed, case_factory, changes_factory, evidenceformat_factory, guild_embed, immune_embed, overrides_embed, type_embed
from .utilities.json import dump
from .utilities.logger import logger
from .utilities.utils import check_moddable, check_permissions, create_guild_table, log, timedelta_from_relativedelta
from .utilities.utils import check_moddable, check_permissions, create_guild_table, log, timedelta_from_relativedelta, timedelta_to_string
class Aurora(commands.Cog):
@ -1081,7 +1081,7 @@ class Aurora(commands.Cog):
"timestamp": old_moderation.timestamp,
"reason": old_moderation.reason,
"user_id": old_moderation.moderator_id,
"duration": old_moderation.duration,
"duration": timedelta_to_string(old_moderation.duration),
"end_timestamp": old_moderation.end_timestamp,
}))
moderation.changes.append(Change.from_dict(interaction.client, {
@ -1089,7 +1089,7 @@ class Aurora(commands.Cog):
"timestamp": int(time.time()),
"reason": moderation.reason,
"user_id": interaction.user.id,
"duration": moderation.duration,
"duration": timedelta_to_string(old_moderation.duration),
"end_timestamp": moderation.end_timestamp,
}))