Updated args to enable API
This commit is contained in:
@@ -42,7 +42,4 @@
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\DiscordBotCore\DiscordBotCore.csproj" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Folder Include="Properties\" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
@@ -120,8 +120,14 @@ public class Program
|
||||
!Application.CurrentApplication.ApplicationEnvironmentVariables.ContainsKey("prefix"))
|
||||
await Installer.GenerateStartupConfig();
|
||||
|
||||
Application.InitializeThreadedApi();
|
||||
Application.InitializeThreadedSockets();
|
||||
if (args.Length > 0)
|
||||
{
|
||||
if(args.Contains("--http-api"))
|
||||
Application.InitializeThreadedApi();
|
||||
if(args.Contains("--socket-api"))
|
||||
Application.InitializeThreadedSockets();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -1,16 +0,0 @@
|
||||
{
|
||||
"profiles": {
|
||||
"DiscordBot": {
|
||||
"commandName": "Project"
|
||||
},
|
||||
"DiscordBot (wsl Build)": {
|
||||
"commandName": "WSL2",
|
||||
"distributionName": "Debian"
|
||||
},
|
||||
"DiscordBot (wsl Run)": {
|
||||
"commandName": "Executable",
|
||||
"executablePath": "wsl",
|
||||
"commandLineArgs": "./DiscordBot"
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user