diff options
author | Trygve Aaberge <trygveaa@gmail.com> | 2023-10-14 17:25:10 +0200 |
---|---|---|
committer | Trygve Aaberge <trygveaa@gmail.com> | 2024-02-18 11:32:54 +0100 |
commit | a1fedfb2b173a2240a0a695dfe8bf38bca352f0a (patch) | |
tree | 2fbc88613f2771e57c4f31c74585d9ce4db82201 /slack/slack_message.py | |
parent | 08f29b315dd3e3234357e4ffadea4b1334f2539a (diff) | |
download | wee-slack-a1fedfb2b173a2240a0a695dfe8bf38bca352f0a.tar.gz |
Add some repr methods for useful debug printing
Diffstat (limited to 'slack/slack_message.py')
-rw-r--r-- | slack/slack_message.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/slack/slack_message.py b/slack/slack_message.py index 21402dd..c1953d3 100644 --- a/slack/slack_message.py +++ b/slack/slack_message.py @@ -180,6 +180,9 @@ class PendingMessageItem: self.item_id = item_id self.display_type: Literal["mention", "chat"] = display_type + def __repr__(self): + return f"{self.__class__.__name__}({self.message}, {self.item_type}, {self.item_id}, {self.display_type})" + async def resolve(self) -> str: if self.item_type == "conversation": conversation = await self.message.workspace.conversations[self.item_id] @@ -254,6 +257,9 @@ class SlackMessage: ) self._deleted = False + def __repr__(self): + return f"{self.__class__.__name__}({self.conversation}, {self.ts})" + @property def workspace(self) -> SlackWorkspace: return self.conversation.workspace |