From e9578dc8d9701dfce81e928ae94b1e57c69df11b Mon Sep 17 00:00:00 2001 From: ModulatingForce <116608425+modulatingforce@users.noreply.github.com> Date: Wed, 20 Dec 2023 19:12:53 -0500 Subject: [PATCH] require env var login_name --- README.md | 3 +++ src/core/botinstance.rs | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index a55b0be..0a3c0c5 100644 --- a/README.md +++ b/README.md @@ -7,5 +7,8 @@ test ModulatingForceBot 1. Set the following environment variables ; either on environment variables or in an .env file +`login_name = ` + `access_token = ` + `bot_channels = ,` diff --git a/src/core/botinstance.rs b/src/core/botinstance.rs index 5d8e11f..f7f4f15 100644 --- a/src/core/botinstance.rs +++ b/src/core/botinstance.rs @@ -50,7 +50,8 @@ impl BotInstance { pub fn init() -> BotInstance { dotenv().ok(); - let login_name = "modulatingforcebot".to_owned(); + // let login_name = "modulatingforcebot".to_owned(); + let login_name = env::var("login_name").unwrap().to_owned(); let oauth_token = env::var("access_token").unwrap().to_owned(); /*