pub async fn listen_to_channel<F, Fut>(
    team_name: &str,
    channel_name: &str,
    cb: F
)where
    F: FnOnce(SlackMessage) -> Fut,
    Fut: Future<Output = ()>,
Expand description

Create a listener for channel channel_name of workspace team_name.

If you have not connected your workspace with Flows.network platform, you will receive an error in the flow’s building log or running log.

Before creating the listener, this function will revoke previous registered listener of current flow so you don’t need to do it manually.

cb is a callback function which will be called when the new SlackMessage is received.