diff options
author | Trygve Aaberge <trygveaa@gmail.com> | 2023-01-15 14:18:37 +0100 |
---|---|---|
committer | Trygve Aaberge <trygveaa@gmail.com> | 2024-02-18 11:32:53 +0100 |
commit | 988c7770e2c70e0cdf8268dabb4ef6f02ce2ca99 (patch) | |
tree | 9fd61b1bc60d614904a1d5c51c6c157c10850394 /slack/slack_api.py | |
parent | 7b9cf4d9278f584c4ce754e3dfbbcd245b1f9985 (diff) | |
download | wee-slack-988c7770e2c70e0cdf8268dabb4ef6f02ce2ca99.tar.gz |
Show nick suffix for bots
Diffstat (limited to 'slack/slack_api.py')
-rw-r--r-- | slack/slack_api.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/slack/slack_api.py b/slack/slack_api.py index 463dce9..081a2f4 100644 --- a/slack/slack_api.py +++ b/slack/slack_api.py @@ -8,6 +8,7 @@ from slack.http import http_request from slack.shared import shared if TYPE_CHECKING: + from slack_api.slack_bots_info import SlackBotInfoResponse from slack_api.slack_conversations_history import SlackConversationsHistoryResponse from slack_api.slack_conversations_info import SlackConversationsInfoResponse from slack_api.slack_rtm_connect import SlackRtmConnectResponse @@ -15,7 +16,7 @@ if TYPE_CHECKING: from slack_api.slack_users_info import SlackUsersInfoResponse from slack.slack_conversation import SlackConversation - from slack.slack_user import SlackUser + from slack.slack_user import SlackBot, SlackUser from slack.slack_workspace import SlackWorkspace @@ -88,3 +89,6 @@ class SlackApi: async def fetch_users_info(self, user: SlackUser) -> SlackUsersInfoResponse: return await self._fetch("users.info", {"user": user.id}) + + async def fetch_bots_info(self, bot: SlackBot) -> SlackBotInfoResponse: + return await self._fetch("bots.info", {"bot": bot.id}) |