diff --git a/src/config.rs b/src/config.rs index d7aad5d132ecec266496bbfe850b1d7fde027ade..3290df3c1c19294071f0d406132c3a708cdb3ac9 120000 --- a/src/config.rs +++ b/src/config.rs @@ -11,8 +11,6 @@ lazy_static! { pub static ref CONFIG: UccbotConfig = toml::from_str(&CONFIG_FILE).unwrap(); } -pub static DISCORD_TOKEN: &str = include_str!("discord_token"); - #[derive(Deserialize)] pub struct UccbotConfig { pub server_id: u64, diff --git a/src/main.rs b/src/main.rs index 53cb2ffd779581d0cfb3dcf5e5e3886413b27697..7c05828daaa72a40f62225ed7be1b88e53aa7561 100644 --- a/src/main.rs +++ b/src/main.rs @@ -5,7 +5,7 @@ extern crate lazy_static; extern crate log; extern crate simplelog; use simplelog::*; -use std::fs::File; +use std::fs::{File, read_to_string}; use serenity::{ model::{channel, channel::Message, gateway::Ready, guild::Member}, @@ -155,7 +155,7 @@ fn main() { // Configure the client with your Discord bot token in the environment. - let token = config::DISCORD_TOKEN; + let token = read_to_string("discord_token").unwrap(); // Create a new instance of the Client, logging in as a bot. This will // automatically prepend your bot token with "Bot ", which is a requirement