我正在开发一个 slack 应用程序(范围包括 bot 和传入的 webhook)。我可以将消息发送到定义的频道,但我不知道如何停止使用“&channel =”参数而只是将消息发送到收听频道。通过收听,我的意思是,当安装应用程序时,会询问用户在哪里发布(必须选择频道或 dm)。
String postUrl = "https://slack.com/api/chat.postMessage?token=" + botAccessToken + "&as_user=false&channel=%23community&text=testing&username=CommunityQ";
任何提示都会很有用。