20 lines
384 B
Python
20 lines
384 B
Python
import dataclasses
|
|
import datetime
|
|
|
|
|
|
MYSELF = 'MYSELF'
|
|
|
|
|
|
@dataclasses.dataclass(frozen=True, order=True)
|
|
class Message:
|
|
sent_at: datetime.datetime
|
|
sender: str
|
|
text: str
|
|
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
|
|
assert self.chat_id is not None
|