custom more intuitive
This commit is contained in:
parent
16d19ca9b4
commit
607515757e
1 changed files with 12 additions and 6 deletions
|
@ -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),
|
||||
],
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue