This commit is contained in:
parent
fb1617d6d9
commit
5fb373c522
1 changed files with 11 additions and 2 deletions
|
@ -11,10 +11,19 @@ use crate::core::bot_actions::actions_util::{self, BotAR};
|
||||||
use crate::core::botinstance::ChType;
|
use crate::core::botinstance::ChType;
|
||||||
use crate::core::botlog;
|
use crate::core::botlog;
|
||||||
use crate::core::botmodules::{BotActionTrait, BotCommand, BotModule, ModulesManager};
|
use crate::core::botmodules::{BotActionTrait, BotCommand, BotModule, ModulesManager};
|
||||||
|
use dotenv::dotenv;
|
||||||
|
use std::env;
|
||||||
|
|
||||||
fn adminvector() -> Vec<String> {
|
fn adminvector() -> Vec<String> {
|
||||||
vec![String::from("ModulatingForce")]
|
// vec![String::from("ModulatingForce")]
|
||||||
//vec![]
|
// //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>) {
|
pub async fn init(mgr: Arc<ModulesManager>) {
|
||||||
|
|
Loading…
Reference in a new issue