1
command
をAPI経由でスラックにプログラムで送信する方法はありますか?私は正常にこれはうまく動作しますが、はだけではなく、コマンドとして実行するのテキストとして印刷されスラックAPI経由でコマンドを送信
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" }
});
を使用してメッセージを投稿しています。私は{"command", "/mycommand hello" }
のペアを追加しようとしましたが、何も起こりませんでした。
おかげ
[Slackでスラッシュコマンドを特定の時間に毎日実行するにはどうすればいいですか?](https://stackoverflow.com/questions/43762414/how-can-i-trigger-a-slash-command-スラックボットとしてのスラッシュコマンドの実行](https://stackoverflow.com/questions/39829741/execute-slash-command-as-slack-bot)を参照してください。 –