Public Access
Add check for ollama env
This commit is contained in:
1 parent
41f8544a6a
commit
7d7fcb9860
1 file changed
+5
-1
+5
-1
@@ -1,6 +1,6 @@
|
|||||||
use std::env;
|
use std::env;
|
||||||
use poise::serenity_prelude as sere;
|
use poise::serenity_prelude as sere;
|
||||||
use tracing::{info, error, debug, trace};
|
use tracing::{info, error, debug, trace, warn};
|
||||||
use tracing_subscriber::EnvFilter;
|
use tracing_subscriber::EnvFilter;
|
||||||
pub mod commands;
|
pub mod commands;
|
||||||
pub mod event_handler;
|
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");
|
let token = env::var("TG_BOT_DISCORD_TOKEN").expect("Expected a token in the environment");
|
||||||
trace!("Token loaded");
|
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...");
|
info!("Starting bot...");
|
||||||
|
|||||||
Reference in new issue
Block a user