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

21 lines
416 B
Python
Raw Permalink Normal View History

import dataclasses
import datetime
2024-11-03 22:49:35 +00:00
__all__ = ['MYSELF', 'Message']
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