code: def rtm_send_message(self, channel_id, message, thread_ts=None):
          
          message = {"type": "message", "channel": channel_id, "text": message}
          if thread_ts:
              message["thread_ts"] = thread_ts
          self.send_to_websocket(message)
docs: Send a message using the slack webhook (RTM) API.
  
          RTM messages should be used for simple messages that don't include anything fancy (like
          attachments). Use Slack's basic message formatting:
          https://api.slack.com/docs/message-formatting