custom more intuitive
All checks were successful
ci/woodpecker/push/cargo-checks Pipeline was successful
ci/woodpecker/pr/cargo-checks Pipeline was successful

This commit is contained in:
ModulatingForce 2024-03-12 21:59:02 -04:00
parent 16d19ca9b4
commit 607515757e

View file

@ -15,26 +15,32 @@ 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<ModulesManager>) {
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),
],
};