diff --git a/src/main.rs b/src/main.rs index 6770d69..daa74df 100644 --- a/src/main.rs +++ b/src/main.rs @@ -205,12 +205,12 @@ fn _dispatch_error_no_macro<'fut>( async fn main() { let _ = dotenv::from_filename(".env"); - let champions = std::fs::File::open("champions.json").expect("failed to open champions.json"); - let champions: Vec = serde_json::from_reader::<_, HashMap>(champions) - .expect("failed to parse champions") - .into_iter() - .map(|(name, url)| Champion { name, url }) - .collect(); + let champions: Vec = + serde_json::from_str::>(include_str!("../champions.json")) + .expect("failed to parse champions") + .into_iter() + .map(|(name, url)| Champion { name, url }) + .collect(); // Configure the client with your Discord bot token in the environment. let token = env::var("DISCORD_TOKEN").expect("Expected a token in the environment");