diff --git a/src/core/botinstance.rs b/src/core/botinstance.rs index e31077f..ea8e03c 100644 --- a/src/core/botinstance.rs +++ b/src/core/botinstance.rs @@ -278,7 +278,7 @@ impl BotInstance { }; botlog::trace( - "Checking if permissible", + "Checked if permissible", Some("BotInstance > listener_main_prvmsg()".to_string()), Some(msg), ); diff --git a/src/custom/experiments.rs b/src/custom/experiments.rs index 462630f..e383696 100644 --- a/src/custom/experiments.rs +++ b/src/custom/experiments.rs @@ -15,14 +15,17 @@ use std::sync::Arc; use twitch_irc::message::PrivmsgMessage; +use crate::core::botinstance::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; +use crate::core::identity::UserRole; pub async fn init(mgr: Arc) { + + // 1. Define the BotAction let botc1 = BotCommand { module: BotModule(String::from("experiments001")), @@ -30,7 +33,9 @@ pub async fn init(mgr: Arc) { 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![identity::UserRole::BotAdmin], + required_roles: vec![UserRole::BotAdmin, + UserRole::Mod(Channel(String::new())) + ], }; // 2. Add the BotAction to ModulesManager