aboutsummaryrefslogtreecommitdiffstats
path: root/typings
diff options
context:
space:
mode:
authorTrygve Aaberge <trygveaa@gmail.com>2023-08-20 15:25:33 +0200
committerTrygve Aaberge <trygveaa@gmail.com>2024-02-18 11:32:53 +0100
commit2cfbb994506cb6d8e63d95b7f98feee06418c67d (patch)
treeaa5835bac2bf8a5901bd338714aee93fcb6c2ebd /typings
parent54f5307fc74c5f60314f09991a20b868b5837d07 (diff)
downloadwee-slack-2cfbb994506cb6d8e63d95b7f98feee06418c67d.tar.gz
Render join and leave messages correctly
Diffstat (limited to 'typings')
-rw-r--r--typings/slack_api/slack_conversations_history.pyi19
-rw-r--r--typings/slack_rtm/slack_rtm_message.pyi12
2 files changed, 31 insertions, 0 deletions
diff --git a/typings/slack_api/slack_conversations_history.pyi b/typings/slack_api/slack_conversations_history.pyi
index 04a48e1..809e7c6 100644
--- a/typings/slack_api/slack_conversations_history.pyi
+++ b/typings/slack_api/slack_conversations_history.pyi
@@ -161,6 +161,23 @@ class SlackMessageSubtypeBotAdd(SlackMessageCommon):
class SlackMessageSubtypeBotAddFinal(SlackMessageSubtypeBotAdd):
pass
+class SlackMessageSubtypeChannelJoin(SlackMessageCommon):
+ subtype: Literal["channel_join", "group_join"]
+ user: str
+ inviter: NotRequired[str]
+
+@final
+class SlackMessageSubtypeChannelJoinFinal(SlackMessageSubtypeChannelJoin):
+ pass
+
+class SlackMessageSubtypeChannelLeave(SlackMessageCommon):
+ subtype: Literal["channel_leave", "group_leave"]
+ user: str
+
+@final
+class SlackMessageSubtypeChannelLeaveFinal(SlackMessageSubtypeChannelLeave):
+ pass
+
SlackMessage = (
SlackMessageStandardFinal
| SlackMessageThreadParentNotSubscribedFinal
@@ -169,6 +186,8 @@ SlackMessage = (
| SlackMessageSubtypeBotMessageFinal
| SlackMessageSubtypeBotRemoveFinal
| SlackMessageSubtypeBotAddFinal
+ | SlackMessageSubtypeChannelJoinFinal
+ | SlackMessageSubtypeChannelLeaveFinal
| SlackMessageRtm
)
diff --git a/typings/slack_rtm/slack_rtm_message.pyi b/typings/slack_rtm/slack_rtm_message.pyi
index 7eb50f1..1e0c105 100644
--- a/typings/slack_rtm/slack_rtm_message.pyi
+++ b/typings/slack_rtm/slack_rtm_message.pyi
@@ -4,6 +4,8 @@ from slack_api.slack_conversations_history import (
SlackMessageSubtypeBotAdd,
SlackMessageSubtypeBotMessage,
SlackMessageSubtypeBotRemove,
+ SlackMessageSubtypeChannelJoin,
+ SlackMessageSubtypeChannelLeave,
SlackMessageThreadParentNotSubscribed,
SlackMessageThreadParentSubscribed,
SlackMessageWithFiles,
@@ -46,6 +48,14 @@ class SlackMessageSubtypeBotAddRtm(SlackMessageSubtypeBotAdd):
channel: str
@final
+class SlackMessageSubtypeChannelJoinRtm(SlackMessageSubtypeChannelJoin):
+ channel: str
+
+@final
+class SlackMessageSubtypeChannelLeaveRtm(SlackMessageSubtypeChannelLeave):
+ channel: str
+
+@final
class SlackMessageChanged(TypedDict):
type: Literal["message"]
subtype: Literal["message_changed"]
@@ -93,6 +103,8 @@ SlackMessageRtm = (
| SlackMessageSubtypeBotMessageRtm
| SlackMessageSubtypeBotRemoveRtm
| SlackMessageSubtypeBotAddRtm
+ | SlackMessageSubtypeChannelJoinRtm
+ | SlackMessageSubtypeChannelLeaveRtm
)
SlackRtmMessage = (