Skip to content

Commit c5815b9

Browse files
committed
feat: add __int__ method to Timestamp class
1 parent bc458c2 commit c5815b9

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)