slack-flows 0.2.0

Slack extension for flows.network
Documentation

This is a library for integrating Slack in your flow function for test.flows.network.

Usage example

use slack_flows::{channel_msg_received, send_message_to_channel};

#[no_mangle]
pub fn run() {
    if let Some(sm) = channel_msg_received("myworkspace", "mychannel") {
        send_message_to_channel("myworkspace", "mychannel", format!("Hello, {}", sm.text));
    }
}

In run() the channel_msg_received will create a listener for new message from channel mychannel in workspace myworkspace.

When a new message is sent to mychannel, the run() will be called again. We get the SlackMessage then send_message_to_channel.

The whole document is here.