Is there a way to programmatically send a command
to Slack via the API? I'm successfully posting a message using
var postingResponse = client.UploadValues("https://slack.com/api/chat.postMessage",
"POST", new NameValueCollection() {
{"token","<token>"},
{"channel","<ID>"},
{"text", "/mycommand hello" },
{"username","<username>" },
{"link_names", "true" },
{"parse", "full" }
});
This works well but the /mycommand hello
is just printed as text instead of executing as a command. I tried adding a pair {"command", "/mycommand hello" }
but nothing happened either.
Thanks