From 38ef956ba9b40633569221ea6f9afd695e5f9a26 Mon Sep 17 00:00:00 2001 From: yuji-sakurai Date: Fri, 10 Jan 2020 13:36:09 +0900 Subject: [PATCH 1/2] add post ephemeral --- requirements.txt | 2 +- slackbot/slackclient.py | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 896f094e..1eac18a0 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,5 @@ requests>=2.4.0 websocket-client>=0.22.0,<=0.44.0 -slacker>=0.9.50 +slacker>=0.9.60 six>=1.10.0 pytest>=2.9.1 diff --git a/slackbot/slackclient.py b/slackbot/slackclient.py index 75473930..123d99c2 100644 --- a/slackbot/slackclient.py +++ b/slackbot/slackclient.py @@ -146,6 +146,13 @@ def send_message(self, channel, message, attachments=None, as_user=True, thread_ as_user=as_user, thread_ts=thread_ts) + def send_ephemeral_message(self, channel, message, attachments=None): + self.webapi.chat.post_ephemeral( + channel, + message, + user=self.login_data['self']['name'], + attachments=attachments) + def get_channel(self, channel_id): return Channel(self, self.channels[channel_id]) From fa5ebd75503c7c8b2cda04c753c4cb2a7b2c2ec0 Mon Sep 17 00:00:00 2001 From: yuji-sakurai Date: Fri, 10 Jan 2020 13:58:45 +0900 Subject: [PATCH 2/2] change slacker version --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 2c38344d..4f591584 100644 --- a/setup.py +++ b/setup.py @@ -6,7 +6,7 @@ install_requires = ( 'requests>=2.4.0', 'websocket-client>=0.22.0,<=0.44.0', - 'slacker>=0.9.50', + 'slacker>=0.9.60', 'six>=1.10.0' ) # yapf: disable