This is a library for integrating Slack in your flow function for [flows.network](https://flows.network).
## Usage example
```rust
use slack_flows::{listen_to_channel, send_message_to_channel};
#[no_mangle]
pub fn run() {
listen_to_channel("myworkspace", "mychannel", |sm| {
send_message_to_channel("myworkspace", "mychannel", format!("Hello, {}", sm.text))
}).await;
}
```
In `run()` the [`listen_to_channel`](https://docs.rs/slack-flows/latest/slack_flows/fn.listen_to_channel.html) 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`](https://docs.rs/slack-flows/latest/slack_flows/struct.SlackMessage.html) then [`send_message_to_channel`](https://docs.rs/slack-flows/latest/slack_flows/fn.send_message_to_channel.html).
The whole document is [here](https://docs.rs/slack-flows).