diff options
Diffstat (limited to 'slack')
-rw-r--r-- | slack/slack_conversation.py | 3 | ||||
-rw-r--r-- | slack/slack_message.py | 6 | ||||
-rw-r--r-- | slack/slack_workspace.py | 2 |
3 files changed, 10 insertions, 1 deletions
diff --git a/slack/slack_conversation.py b/slack/slack_conversation.py index 4a33989..ba76803 100644 --- a/slack/slack_conversation.py +++ b/slack/slack_conversation.py @@ -121,6 +121,9 @@ class SlackConversation(SlackBuffer): info_response = await workspace.api.fetch_conversations_info(conversation_id) return cls(workspace, info_response["channel"]) + def __repr__(self): + return f"{self.__class__.__name__}({self.workspace}, {self.id})" + @property def id(self) -> str: return self._info["id"] 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 diff --git a/slack/slack_workspace.py b/slack/slack_workspace.py index 1b60013..76c8350 100644 --- a/slack/slack_workspace.py +++ b/slack/slack_workspace.py @@ -195,7 +195,7 @@ class SlackWorkspace: self.usergroups = SlackUsergroups(self) def __repr__(self): - return f"{self.__class__.__name__}('{self.name}')" + return f"{self.__class__.__name__}({self.name})" @property def token_type(self) -> Literal["oauth", "session", "unknown"]: |