load token from token.txt

This commit is contained in:
fzorb 2025-07-14 13:46:40 +03:00
parent 00f670a144
commit d1b3867849

View file

@ -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;