Bot admins in env file #22

Merged
modulatingforce merged 7 commits from haru_test into master 2024-04-09 13:48:55 -04:00
Showing only changes of commit 5fb373c522 - Show all commits

View file

@ -11,10 +11,19 @@ use crate::core::bot_actions::actions_util::{self, BotAR};
use crate::core::botinstance::ChType;
use crate::core::botlog;
use crate::core::botmodules::{BotActionTrait, BotCommand, BotModule, ModulesManager};
use dotenv::dotenv;
use std::env;
fn adminvector() -> Vec<String> {
vec![String::from("ModulatingForce")]
//vec![]
// vec![String::from("ModulatingForce")]
// //vec![]
dotenv().ok();
let mut admins = Vec::new();
for admin in env::var("bot_admins").unwrap().split(',') {
admins.push(String::from(admin))
}
admins
}
pub async fn init(mgr: Arc<ModulesManager>) {