diff --git a/src/custom/experiments.rs b/src/custom/experiments.rs index e383696..8b1bece 100644 --- a/src/custom/experiments.rs +++ b/src/custom/experiments.rs @@ -15,27 +15,33 @@ use std::sync::Arc; use twitch_irc::message::PrivmsgMessage; -use crate::core::botinstance::ChType::Channel; +// use crate::core::botinstance::ChType::Channel; +use crate::core::botinstance::ChType; +use ChType::Channel; use crate::core::botlog; use crate::core::bot_actions::actions_util::{self, BotAR}; use crate::core::botmodules::{BotActionTrait, BotCommand, BotModule, Listener, ModulesManager}; -use crate::core::identity::UserRole; +use crate::core::identity::UserRole::*; pub async fn init(mgr: Arc) { + const OF_CMD_CHANNEL:ChType = Channel(String::new()); // 1. Define the BotAction let botc1 = BotCommand { module: BotModule(String::from("experiments001")), command: String::from("test1"), // command call name - alias: vec![String::from("tester1"), String::from("testy1")], // String of alternative names + alias: vec![ + String::from("tester1"), + String::from("testy1")], // String of alternative names exec_body: actions_util::asyncbox(testy), help: String::from("Test Command tester"), - required_roles: vec![UserRole::BotAdmin, - UserRole::Mod(Channel(String::new())) - ], + required_roles: vec![ + BotAdmin, + Mod(OF_CMD_CHANNEL), + ], }; // 2. Add the BotAction to ModulesManager