From 5fb373c522abbf350596e7c0ed98d7b4ec015513 Mon Sep 17 00:00:00 2001 From: haruyuumei Date: Sun, 17 Mar 2024 19:12:33 -0300 Subject: [PATCH] bot admins change --- src/core/identity.rs | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/core/identity.rs b/src/core/identity.rs index 877fb6c..6392eb3 100644 --- a/src/core/identity.rs +++ b/src/core/identity.rs @@ -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 { - 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) {