Updated args to enable API

This commit is contained in:
2024-12-19 00:04:39 +02:00
parent c79c792c43
commit a754b0e5a9
3 changed files with 8 additions and 21 deletions

View File

@@ -42,7 +42,4 @@
<ItemGroup>
<ProjectReference Include="..\DiscordBotCore\DiscordBotCore.csproj" />
</ItemGroup>
<ItemGroup>
<Folder Include="Properties\" />
</ItemGroup>
</Project>

View File

@@ -120,8 +120,14 @@ public class Program
!Application.CurrentApplication.ApplicationEnvironmentVariables.ContainsKey("prefix"))
await Installer.GenerateStartupConfig();
if (args.Length > 0)
{
if(args.Contains("--http-api"))
Application.InitializeThreadedApi();
if(args.Contains("--socket-api"))
Application.InitializeThreadedSockets();
}
}

View File

@@ -1,16 +0,0 @@
{
"profiles": {
"DiscordBot": {
"commandName": "Project"
},
"DiscordBot (wsl Build)": {
"commandName": "WSL2",
"distributionName": "Debian"
},
"DiscordBot (wsl Run)": {
"commandName": "Executable",
"executablePath": "wsl",
"commandLineArgs": "./DiscordBot"
}
}
}