Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom slash commands not working #227

Closed
nikolay opened this issue May 5, 2016 · 4 comments
Closed

Custom slash commands not working #227

nikolay opened this issue May 5, 2016 · 4 comments

Comments

@nikolay
Copy link

nikolay commented May 5, 2016

I use OpsGenie, which in Slack has the /genie command, but it doesn't work in WeeSlack. Please, advise!

@rawdigits
Copy link
Collaborator

I don't use custom slash commands, but we should probably support them. Happy to take PRs or even advice on how they would integrate. It's...complicated because of how slash commands pretain to weechat in general.

@nikolay
Copy link
Author

nikolay commented May 6, 2016

@rawdigits Okay, let me look into it. Slack support is pretty useless without them.

@cwegener
Copy link

👍 I have no clue how to implement it, but I would love to see custom slash commands working in wee-slack!

@V13Axel
Copy link
Contributor

V13Axel commented Oct 13, 2016

So it looks like, when a slash command is called, it's sent very simply as a POST to /api/chat.command.

I run the command /commander sg-lookup param1=info param2=moreinfo and the payload looks like this in Chrome Dev Tools:

Content-Disposition: form-data; name="command"

/commander
------WebKitFormBoundary[RID info]
Content-Disposition: form-data; name="text"

sg-lookup param1=info param2=moreinfo
------WebKitFormBoundary[RID info]
Content-Disposition: form-data; name="channel"

[channel id]
------WebKitFormBoundary[RID info]
Content-Disposition: form-data; name="token"

[api token]
------WebKitFormBoundary[RID info]--```

In our case at least, the bot's response is sent back directly as a message via the websocket, no differently than if we ran the slash command via the Slack client... Which works already. So if the chat.command post gets implemented, the rest should "Just Werk"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants