aboutsummaryrefslogtreecommitdiffstats
path: root/slack/slack_api.py
diff options
context:
space:
mode:
Diffstat (limited to 'slack/slack_api.py')
-rw-r--r--slack/slack_api.py28
1 files changed, 14 insertions, 14 deletions
diff --git a/slack/slack_api.py b/slack/slack_api.py
index b687416..f70e2f4 100644
--- a/slack/slack_api.py
+++ b/slack/slack_api.py
@@ -268,20 +268,6 @@ class SlackApi(SlackApiCommon):
raise SlackApiError(self.workspace, method, response, params)
return response
- async def _set_user_profile(self, profile: SlackSetProfile):
- method = "users.profile.set"
- body = {"profile": profile}
- response: SlackUsersProfileSetResponse = await self._post(method, body)
- if response["ok"] is False:
- raise SlackApiError(self.workspace, method, response, body)
- return response
-
- async def set_user_status(self, status: str):
- return await self._set_user_profile({"status_text": status})
-
- async def clear_user_status(self):
- return await self._set_user_profile({"status_emoji": "", "status_text": ""})
-
async def _fetch_users_info_without_splitting(self, user_ids: Iterable[str]):
method = "users.info"
params: Params = {"users": ",".join(user_ids)}
@@ -492,3 +478,17 @@ class SlackApi(SlackApiCommon):
if response["ok"] is False:
raise SlackApiError(self.workspace, method, response, params)
return response
+
+ async def _set_user_profile(self, profile: SlackSetProfile):
+ method = "users.profile.set"
+ body = {"profile": profile}
+ response: SlackUsersProfileSetResponse = await self._post(method, body)
+ if response["ok"] is False:
+ raise SlackApiError(self.workspace, method, response, body)
+ return response
+
+ async def set_user_status(self, status: str):
+ return await self._set_user_profile({"status_text": status})
+
+ async def clear_user_status(self):
+ return await self._set_user_profile({"status_emoji": "", "status_text": ""})