Skip to main content

robson_cli/
lib.rs

1pub mod cli;
2
3use std::sync::Arc;
4
5use robson_core::plugin::SensoriumLoop;
6use robson_gateway_slack::SlackGateway;
7
8/// Construct a `SensoriumLoop` with a `SlackGateway` registered.
9/// Does not register any workers — callers can add their own before calling `run()`.
10pub fn build_sensorium_loop(
11    bot_token: String,
12    app_token: String,
13    default_channel: String,
14) -> SensoriumLoop {
15    let gateway = Arc::new(SlackGateway::new(bot_token, app_token, default_channel));
16    let mut sensorium = SensoriumLoop::new();
17    sensorium.register_gateway(gateway);
18    sensorium
19}