From d1b3867849917d8eb97ce45282242fab05fdd4ed Mon Sep 17 00:00:00 2001 From: fzorb Date: Mon, 14 Jul 2025 13:46:40 +0300 Subject: [PATCH] load token from token.txt --- src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index 63ecdc1..2304ae6 100644 --- a/src/main.rs +++ b/src/main.rs @@ -60,7 +60,7 @@ impl EventHandler for Handler { #[tokio::main] async fn main() { fsFile::create_new("quotes.txt"); - let token = env::var("DISCORD_TOKEN").expect("Expected a token in the environment"); + let token = std::fs::read_to_string("token.txt").expect("Can't read token.txt file!"); let intents = GatewayIntents::GUILD_MESSAGES | GatewayIntents::DIRECT_MESSAGES | GatewayIntents::MESSAGE_CONTENT;