slack-flows

Crates.ioslack-flows
lib.rsslack-flows
version0.3.4
sourcesrc
created_at2022-12-14 14:37:30.724587
updated_at2023-07-10 09:56:35.424612
descriptionSlack extension for flows.network
homepage
repository
max_upload_size
id736631
size13,989
DarumaDocker!! (DarumaDocker)

documentation

https://docs.rs/slack-flows

README

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

Usage example

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 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.

Commit count: 0

cargo fmt