0

I'm creating my second Slackbot/Slack Slash Command project and everything's been working fine this far, however I tried retrieving the text that user enters after the initial slash command that triggers the bot but the event.body gets returned as a string, e.g.

body: 'token=xxx&team_id=xxx&team_domain=xxx&channel_id=xx&channel_name=privategroup&user_id=U92DLDLKB&user_name=j_b&command=%2Fstanduprota&text=dave&....'

In the first bot I created I was able to get event.body.text without having to do magic with splitting the event.body string and turning into a key/value pair array.

Any ideas why this might be happening?

j9411
  • 3
  • 1
  • please specify your environment. Is this node.js? are you using an extension to access web requests, e.g. express. – Erik Kalkoken Mar 07 '18 at 14:18
  • also check this answer on how to read POST requests with node.js: https://stackoverflow.com/questions/4295782/how-do-you-extract-post-data-in-node-js – Erik Kalkoken Mar 07 '18 at 14:19

0 Answers0