fix(aurora): fixed an error with timedelta formatting
Some checks failed
Actions / Build Documentation (MkDocs) (pull_request) Successful in 28s
Actions / Lint Code (Ruff & Pylint) (pull_request) Failing after 43s

This commit is contained in:
Seaswimmer 2024-06-04 15:22:50 -04:00
parent 5151f65317
commit 0a207b66e4
Signed by: cswimr
GPG key ID: 5D671B5D03D65A7F
2 changed files with 8 additions and 1 deletions

View file

@ -194,6 +194,12 @@ def timedelta_from_relativedelta(relativedelta: rd) -> timedelta:
then = now - relativedelta
return now - then
def timedelta_to_string(timedelta: timedelta) -> str:
"""Converts a timedelta object to a string."""
hours, remainder = divmod(timedelta.seconds, 3600)
minutes, seconds = divmod(remainder, 60)
return f"{hours}:{minutes}:{seconds}s"
def get_footer_image(coginstance: commands.Cog) -> File:
"""Returns the footer image for the embeds."""
image_path = data_manager.bundled_data_path(coginstance) / "arrow.png"