Fully documented and updated PycordEvent (#4)

This commit is contained in:
2025-04-27 17:41:14 +02:00
parent 638658af75
commit 12a88d5a23
5 changed files with 292 additions and 136 deletions

View File

@@ -3,5 +3,5 @@ from zoneinfo import ZoneInfo
# TODO Add documentation
def get_unix_timestamp(date: datetime) -> int:
return int((date.replace(tzinfo=ZoneInfo("UTC"))).timestamp())
def get_unix_timestamp(date: datetime, to_utc: bool = False) -> int:
return int((date if not to_utc else date.replace(tzinfo=ZoneInfo("UTC"))).timestamp())