Giter Club home page Giter Club logo

Comments (5)

mitchmason avatar mitchmason commented on August 11, 2024

https://get.slack.help/hc/en-us/articles/202288908-Format-your-messages
check out the text formatting from slack above

from botkit-middleware.

richielo avatar richielo commented on August 11, 2024

Thank you for your response. But it doesn't seem to cover how to do that for bot tho..newline didn't work when I use \n...

from botkit-middleware.

mitchmason avatar mitchmason commented on August 11, 2024

They included a link specifically for bot messages on that page, direct link here:
https://api.slack.com/docs/message-formatting
but what you should also double check is to make sure Watson is not removing them, in which case you would want to escape them using / character. You should call the Conversation API directly and see what you get back. That is exactly what is sent to slack, that should at least isolate where the problem is occuring, Watson side or Slack side.

from botkit-middleware.

germanattanasio avatar germanattanasio commented on August 11, 2024

Hey @richielo you need to escape your response to Slack. I think you already did because this is a very old issue. Feel free to open this if you were not able to fix it.

from botkit-middleware.

rodalton avatar rodalton commented on August 11, 2024

To include a new line in a response from WA in Slack, you'll need to include the newline character in the text response as defined in the JSON editor i.e. in the WA Dialog, open the JSON editor for the particular node and include the \n as shown in the example below

{
  "output": {
    "generic": [
      {
        "values": [
          {
            "text": "Hi there, how can I help today? :sunglasses: \nAlso saying Hi on a new line, just because I can :thumbsup:"
          }
        ],
        "response_type": "text",
        "selection_policy": "sequential"
      }
    ]
  }
}

from botkit-middleware.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.