Skip to content
This repository has been archived by the owner on May 5, 2024. It is now read-only.

Commit

Permalink
Add timestampts to objects
Browse files Browse the repository at this point in the history
  • Loading branch information
pixeldeee committed Sep 1, 2023
1 parent efd76b3 commit 71b0829
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pytecord/guild.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from .reaction import Emoji, Sticker
from .utils import MessagePayload, get_snowflake, get_list_of_types, apost, rget
from .annotations import hash_str, permissions_set

from .timestamp import Timestamp

class WelcomeScreenChannel:
def __init__(self, data: dict[str, Any], token: str) -> None:
Expand Down Expand Up @@ -349,7 +349,7 @@ def __init__(self, data: dict[str, Any], token: str):
self.application_id = get_snowflake(data.get('application_id'))
self.managed = data.get('managed')
self.parent_id = get_snowflake(data.get('parent_id'))
self.last_pin_timestamp = data.get('last_pin_timestamp')
self.last_pin_timestamp: Timestamp = Timestamp.from_iso(data.get('last_pin_timestamp'))
self.rtc_region = data.get('rtc_region')
self.video_quality_mode = data.get('video_quality_mode')
self.message_count = data.get('message_count')
Expand Down Expand Up @@ -412,8 +412,8 @@ def __init__(self, data: dict[str, Any], token: str) -> None:
self.id = get_snowflake(data.get('id'))
self.author = User(data.get('author'), token)
self.content = data.get('content')
self.timestamp = data.get('timestamp')
self.edited_timestamp = data.get('edited_timestamp')
self.timestamp: Timestamp = Timestamp.from_iso(data.get('timestamp'))
self.edited_timestamp: Timestamp = Timestamp.from_iso(data.get('edited_timestamp'))
self.tts = data.get('tts')
self.mention_everyone = data.get('mention_everyone')
self.mentions = get_list_of_types(User, data.get('mentions'), token)
Expand Down

0 comments on commit 71b0829

Please sign in to comment.