mirror of
https://onedev.fprog.nl/DiscordClient
synced 2025-12-29 06:38:37 +01:00
Revert "Added CommandLine configuration."
This reverts commit 20ed3dd6d8.
This commit is contained in:
parent
29b2f0a71b
commit
2d38922d49
|
|
@ -15,7 +15,6 @@
|
|||
<PackageReference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="8.0.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="8.0.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Configuration.Xml" Version="8.0.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Configuration.CommandLine" Version="8.0.0" />
|
||||
</ItemGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
|
|
|
|||
|
|
@ -5,14 +5,13 @@ using Microsoft.Extensions.Configuration;
|
|||
|
||||
IConfiguration configuration = new ConfigurationBuilder()
|
||||
.AddEnvironmentVariables()
|
||||
.AddCommandLine(args)
|
||||
.AddJsonFile("config.json", true)
|
||||
.AddXmlFile("config.xml", true)
|
||||
.Build();
|
||||
|
||||
string? token = configuration.GetSection("Token").Value;
|
||||
|
||||
if (token is null)
|
||||
if(token is null)
|
||||
{
|
||||
Console.WriteLine("Token has not been found in any form of configuration.");
|
||||
return;
|
||||
|
|
|
|||
Loading…
Reference in a new issue