Public Access
Add check for ollama env
This commit is contained in:
+5
-1
@@ -1,6 +1,6 @@
|
||||
use std::env;
|
||||
use poise::serenity_prelude as sere;
|
||||
use tracing::{info, error, debug, trace};
|
||||
use tracing::{info, error, debug, trace, warn};
|
||||
use tracing_subscriber::EnvFilter;
|
||||
pub mod commands;
|
||||
pub mod event_handler;
|
||||
@@ -48,6 +48,10 @@ async fn main() {
|
||||
let token = env::var("TG_BOT_DISCORD_TOKEN").expect("Expected a token in the environment");
|
||||
trace!("Token loaded");
|
||||
|
||||
if let Err(_) = env::var("TG_BOT_OLLAMA_HOST") {
|
||||
warn!("TG_BOT_OLLAMA_HOST not set, AI commands will not work.");
|
||||
}
|
||||
|
||||
|
||||
|
||||
info!("Starting bot...");
|
||||
|
||||
Reference in New Issue
Block a user