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.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/slack/slack_api.py b/slack/slack_api.py
index 2f57e61..e71860b 100644
--- a/slack/slack_api.py
+++ b/slack/slack_api.py
@@ -412,3 +412,11 @@ class SlackApi(SlackApiCommon):
if response["ok"] is False:
raise SlackApiError(self.workspace, method, response, params)
return response
+
+ async def set_presence(self, presence: Literal["active", "away"]):
+ method = "presence.set"
+ params: Params = {"presence": presence}
+ response: SlackGenericResponse = await self._fetch(method, params)
+ if response["ok"] is False:
+ raise SlackApiError(self.workspace, method, response, params)
+ return response