1
0
libpurple-to-markdown/libpurple_to_markdown/data.py

19 lines
383 B
Python
Raw Normal View History

import dataclasses
import datetime
2024-10-31 19:36:38 +00:00
MYSELF = 'MYSELF'
@dataclasses.dataclass(frozen=True, order=True)
class Message:
sent_at: datetime.datetime
sender: str
text: str
2024-10-31 19:36:38 +00:00
chat_id: str
def __post_init__(self):
assert self.sent_at is not None
assert self.sender is not None
assert self.text is not None
2024-10-31 19:36:38 +00:00
assert self.chat_id is not None