sym.sdk.integrations.slack.send_message¶
- sym.sdk.integrations.slack.send_message(destination: Union[sym.sdk.user.User, sym.sdk.request_destination.RequestDestination], message: str) None ¶
Sends a simple message to a destination in Slack. Accepts either a
User
or aRequestDestination
, which may represent a user, group, or channel in Slack.For example:
# To send to #general: slack.send_message(slack.channel("#general"), "Hello, world!") # To DM a specific user: slack.send_message(slack.user("me@symops.io"), "It works!") # To DM the user who triggered an event: slack.send_message(event.user, "You did a thing!")
- Parameters
destination – Where the message should go.
message – The text contents of the message to send.