aboutsummaryrefslogtreecommitdiffstats
path: root/typings/slack_rtm
diff options
context:
space:
mode:
authorTrygve Aaberge <trygveaa@gmail.com>2023-10-19 23:45:45 +0200
committerTrygve Aaberge <trygveaa@gmail.com>2024-02-18 11:32:54 +0100
commitce7126e9efecb63055283a2c5b6fe474f423f3ed (patch)
tree020daa4dde7c602f670c69998744abba28fdda8a /typings/slack_rtm
parent84c0c20bd5bf04b89384691d90c9ef7f2a41ca0c (diff)
downloadwee-slack-ce7126e9efecb63055283a2c5b6fe474f423f3ed.tar.gz
Support open/close/joined/left conversation events
Diffstat (limited to 'typings/slack_rtm')
-rw-r--r--typings/slack_rtm/slack_rtm_message.pyi49
1 files changed, 49 insertions, 0 deletions
diff --git a/typings/slack_rtm/slack_rtm_message.pyi b/typings/slack_rtm/slack_rtm_message.pyi
index fccb6da..5f78cbb 100644
--- a/typings/slack_rtm/slack_rtm_message.pyi
+++ b/typings/slack_rtm/slack_rtm_message.pyi
@@ -16,6 +16,7 @@ from slack_api.slack_conversations_history import (
SlackMessageThreadParentSubscribed,
SlackMessageWithFiles,
)
+from slack_api.slack_conversations_info import SlackConversationsInfo
from slack_api.slack_conversations_replies import SlackMessageThreadCommon
from slack_api.slack_users_info import SlackUserInfoPerson
from typing_extensions import Literal, NotRequired, TypedDict, final
@@ -152,6 +153,48 @@ class SlackReactionRemoved(TypedDict):
event_ts: str
ts: str
+@final
+class SlackImOpen(TypedDict):
+ type: Literal["im_open"]
+ user: str
+ channel: str
+ event_ts: str
+
+@final
+class SlackImClose(TypedDict):
+ type: Literal["im_close"]
+ user: str
+ channel: str
+ event_ts: str
+
+@final
+class SlackMpimOpen(TypedDict):
+ type: Literal["mpim_open", "group_open"]
+ is_mpim: Literal[True]
+ user: str
+ channel: str
+ event_ts: str
+
+@final
+class SlackMpimClose(TypedDict):
+ type: Literal["mpim_close", "group_close"]
+ is_mpim: Literal[True]
+ user: str
+ channel: str
+ event_ts: str
+
+@final
+class SlackChannelJoined(TypedDict):
+ type: Literal["channel_joined", "group_joined"]
+ channel: SlackConversationsInfo
+
+@final
+class SlackChannelLeft(TypedDict):
+ type: Literal["channel_left", "group_left"]
+ channel: str
+ actor_id: str
+ event_ts: str
+
class SlackNotImMarked(TypedDict):
channel: str
ts: str
@@ -285,6 +328,12 @@ SlackRtmMessage = (
| SlackMessageReplied
| SlackReactionAdded
| SlackReactionRemoved
+ | SlackImOpen
+ | SlackImClose
+ | SlackMpimOpen
+ | SlackMpimClose
+ | SlackChannelJoined
+ | SlackChannelLeft
| SlackChannelMarked
| SlackGroupMarked
| SlackMpImMarked