Skip to content

Commit 574c4ee

Browse files
feat: add __int__ method to Timestamp class (#1794)
1 parent 479d100 commit 574c4ee

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

interactions/models/discord/timestamp.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,3 +163,6 @@ def format(self, style: Optional[Union[TimestampStyles, str]] = None) -> str:
163163

164164
def __str__(self) -> str:
165165
return self.format()
166+
167+
def __int__(self) -> int:
168+
return int(self.timestamp())

0 commit comments

Comments
 (0)