diff --git a/DiscordDelete/Program.cs b/DiscordDelete/Program.cs index c3c6aeb..e388e9a 100644 --- a/DiscordDelete/Program.cs +++ b/DiscordDelete/Program.cs @@ -9,12 +9,11 @@ IConfiguration configuration = new ConfigurationBuilder() .AddXmlFile("config.xml", true) .Build(); -string? token = Environment.GetEnvironmentVariable("DISCORD_TOKEN"); +string? token = configuration.GetSection("Token").Value; -if (token == null) +if(token is null) { - // Exit. - Console.WriteLine("Token is null. Make sure you set the DISCORD_TOKEN environmental variable."); + Console.WriteLine("Token has not been found in any form of configuration."); return; }