diff --git a/machine/__about__.py b/machine/__about__.py index 6d375e87..c083e199 100644 --- a/machine/__about__.py +++ b/machine/__about__.py @@ -14,7 +14,7 @@ __description__ = "A sexy, simple, yet powerful and extendable Slack bot" __uri__ = "https://github.com/DandyDev/slack-machine" -__version_info__ = (0, 20, 3) +__version_info__ = (0, 20, 4) __version__ = ".".join(map(str, __version_info__)) __author__ = "Daan Debie" diff --git a/machine/plugins/base.py b/machine/plugins/base.py index 8c7d60a8..5643d3f0 100644 --- a/machine/plugins/base.py +++ b/machine/plugins/base.py @@ -89,7 +89,7 @@ def at(self, user: dict): return self._client.fmt_mention(user["id"]) async def say( - self, channel, text, attachments=None, thread_ts=None, ephemeral_user=None + self, channel, text, *, attachments=None, thread_ts=None, ephemeral_user=None ): """Send a message to a channel using the WebAPI @@ -115,7 +115,11 @@ async def say( .. _chat.postEphemeral: https://api.slack.com/methods/chat.postEphemeral """ return await self._client.send( - channel, text, attachments, thread_ts, ephemeral_user + channel, + text, + attachments=attachments, + thread_ts=thread_ts, + ephemeral_user=ephemeral_user, ) def say_scheduled(self, when, channel, text, attachments, ephemeral_user): @@ -166,7 +170,7 @@ async def send_dm(self, user, text, attachments=None): .. _chat.postMessage: https://api.slack.com/methods/chat.postMessage """ - return self._client.send_dm(user, text, attachments) + return await self._client.send_dm(user, text, attachments) def send_dm_scheduled(self, when, user, text, attachments=None): """Schedule a Direct Message and send it using the WebAPI