Commit 81686021 authored by Tom Almeida's avatar Tom Almeida

Make the discord token a static variable

parent 0475b328
...@@ -8,6 +8,8 @@ use rand::Rng; ...@@ -8,6 +8,8 @@ use rand::Rng;
struct Handler; struct Handler;
static DISCORD_TOKEN: &str = include_str!("discord_token");
static SERVER_ID: u64 = 606351521117896704; static SERVER_ID: u64 = 606351521117896704;
// #general // #general
static MAIN_CHANNEL: serenity::model::id::ChannelId = static MAIN_CHANNEL: serenity::model::id::ChannelId =
...@@ -290,7 +292,7 @@ impl EventHandler for Handler { ...@@ -290,7 +292,7 @@ impl EventHandler for Handler {
fn main() { fn main() {
// Configure the client with your Discord bot token in the environment. // Configure the client with your Discord bot token in the environment.
let token = include_str!("discord_token"); let token = DISCORD_TOKEN;
// Create a new instance of the Client, logging in as a bot. This will // 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 // automatically prepend your bot token with "Bot ", which is a requirement
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment