fix(aurora): convert timedeltas to strings before creating changes from them
This commit is contained in:
parent
3e484e1ae5
commit
3d3036f9b6
1 changed files with 3 additions and 3 deletions
|
@ -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.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.json import dump
|
||||||
from .utilities.logger import logger
|
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):
|
class Aurora(commands.Cog):
|
||||||
|
@ -1081,7 +1081,7 @@ class Aurora(commands.Cog):
|
||||||
"timestamp": old_moderation.timestamp,
|
"timestamp": old_moderation.timestamp,
|
||||||
"reason": old_moderation.reason,
|
"reason": old_moderation.reason,
|
||||||
"user_id": old_moderation.moderator_id,
|
"user_id": old_moderation.moderator_id,
|
||||||
"duration": old_moderation.duration,
|
"duration": timedelta_to_string(old_moderation.duration),
|
||||||
"end_timestamp": old_moderation.end_timestamp,
|
"end_timestamp": old_moderation.end_timestamp,
|
||||||
}))
|
}))
|
||||||
moderation.changes.append(Change.from_dict(interaction.client, {
|
moderation.changes.append(Change.from_dict(interaction.client, {
|
||||||
|
@ -1089,7 +1089,7 @@ class Aurora(commands.Cog):
|
||||||
"timestamp": int(time.time()),
|
"timestamp": int(time.time()),
|
||||||
"reason": moderation.reason,
|
"reason": moderation.reason,
|
||||||
"user_id": interaction.user.id,
|
"user_id": interaction.user.id,
|
||||||
"duration": moderation.duration,
|
"duration": timedelta_to_string(old_moderation.duration),
|
||||||
"end_timestamp": moderation.end_timestamp,
|
"end_timestamp": moderation.end_timestamp,
|
||||||
}))
|
}))
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue