This is a library for integrating Slack in your flow function for test.flows.network.
```rust use slackflows::{listentochannel, sendmessagetochannel};
pub fn run() { listentochannel("myworkspace", "mychannel", |sm| { sendmessageto_channel("myworkspace", "mychannel", format!("Hello, {}", sm.text)); }); } ```
In run()
the listen_to_channel
will create a listener for new message from channel mychannel
in workspace myworkspace
.
When a new message is sent to mychannel
, the callback closure will be called with the SlackMessage
then send_message_to_channel
.
The whole document is here.