fix(aurora): fixed JSON serializing error in /edit
command
Some checks failed
Pylint / Pylint (3.11) (push) Failing after 40s
Some checks failed
Pylint / Pylint (3.11) (push) Failing after 40s
This commit is contained in:
parent
566608de24
commit
e1cc6ca1a8
3 changed files with 13 additions and 8 deletions
|
@ -1,6 +1,7 @@
|
|||
# pylint: disable=cyclic-import
|
||||
|
||||
import json
|
||||
from datetime import timedelta as td
|
||||
from typing import Union
|
||||
|
||||
from discord import Guild, Interaction, Member, User
|
||||
|
@ -221,3 +222,11 @@ async def send_evidenceformat(interaction: Interaction, case_dict: dict):
|
|||
"evidenceformat", await interaction.client.get_embed_color(None), interaction=interaction, case_dict=case_dict
|
||||
)
|
||||
await interaction.followup.send(content=content, ephemeral=True)
|
||||
|
||||
def convert_timedelta_to_str(timedelta: td):
|
||||
"""This function converts a timedelta object to a string."""
|
||||
total_seconds = int(timedelta.total_seconds())
|
||||
hours = total_seconds // 3600
|
||||
minutes = (total_seconds % 3600) // 60
|
||||
seconds = total_seconds % 60
|
||||
return f"{hours}:{minutes}:{seconds}"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue