diff options
-rw-r--r-- | DSACore/DSA_Game/Dsa.cs | 6 | ||||
-rw-r--r-- | DSACore/DSA_Game/Save/Properties.cs | 2 | ||||
-rw-r--r-- | DSACore/Startup.cs | 8 | ||||
-rw-r--r-- | DiscoBot/DiscoBot.csproj | 25 | ||||
-rw-r--r-- | DiscoBot/Program.cs | 2 | ||||
-rw-r--r-- | DiscoBot/packages.config | 12 |
6 files changed, 32 insertions, 23 deletions
diff --git a/DSACore/DSA_Game/Dsa.cs b/DSACore/DSA_Game/Dsa.cs index 3b2e4aa..dda55c2 100644 --- a/DSACore/DSA_Game/Dsa.cs +++ b/DSACore/DSA_Game/Dsa.cs @@ -16,7 +16,7 @@ namespace DSACore.DSA_Game public static class Dsa { #if DEBUG - public const string rootPath = "C:\\Users\\Dennis\\Source\\Repos\\DiscoBot\\DSACore\\";//"DiscoBot\\DSACore\\"; + public const string rootPath = "";//"C:\\Users\\Dennis\\Source\\Repos\\DiscoBot\\DSACore\\";//"DiscoBot\\DSACore\\"; #else public const string rootPath = "";//"DiscoBot\\DSACore\\"; #endif @@ -61,8 +61,8 @@ namespace DSACore.DSA_Game } */ - Properties.Deserialize(rootPath+"Properties"); - Properties.Serialize(rootPath + "Properties"); + Properties.Deserialize($"{rootPath}Properties"); + Properties.Serialize($"{rootPath}Properties"); Talente = Talente.OrderBy(x => x.Name).ToList(); diff --git a/DSACore/DSA_Game/Save/Properties.cs b/DSACore/DSA_Game/Save/Properties.cs index 459a9c7..b0e07e2 100644 --- a/DSACore/DSA_Game/Save/Properties.cs +++ b/DSACore/DSA_Game/Save/Properties.cs @@ -43,7 +43,7 @@ namespace DSACore.DSA_Game.Save { try { - string name = file.Split('\\').Last().Split('.')[0].Replace('-', '.'); + string name = file.Split('\\').Last().Split('/').Last().Split('.')[0].Replace('-', '.'); string data = File.ReadAllText(file); Type type = Type.GetType(name); if (data.StartsWith("[")) diff --git a/DSACore/Startup.cs b/DSACore/Startup.cs index b1f3258..e024cb4 100644 --- a/DSACore/Startup.cs +++ b/DSACore/Startup.cs @@ -45,7 +45,11 @@ namespace DSACore */ services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_1); - services.AddSignalR(); + services.AddSignalR(hubOptions => + { + hubOptions.EnableDetailedErrors = true; + hubOptions.KeepAliveInterval = TimeSpan.FromMinutes(1); + }); } // This method gets called by the runtime. Use this method to configure the HTTP request pipeline. @@ -60,7 +64,7 @@ namespace DSACore app.UseHsts(); } - app.UseCors("CorsPolicy"); + //app.UseCors("CorsPolicy"); app.UseSignalR(routes => { routes.MapHub<ChatHub>("/chatHub"); }); diff --git a/DiscoBot/DiscoBot.csproj b/DiscoBot/DiscoBot.csproj index d25a5e9..7da96db 100644 --- a/DiscoBot/DiscoBot.csproj +++ b/DiscoBot/DiscoBot.csproj @@ -35,23 +35,28 @@ <WarningLevel>4</WarningLevel> </PropertyGroup> <ItemGroup> - <Reference Include="Discord.Net.Commands, Version=2.0.0.0, Culture=neutral, processorArchitecture=MSIL"> - <HintPath>..\packages\Discord.Net.Commands.2.0.0-beta\lib\netstandard1.1\Discord.Net.Commands.dll</HintPath> + <Reference Include="Discord.Net.Commands, Version=2.0.1.0, Culture=neutral, PublicKeyToken=null"> + <HintPath>..\packages\Discord.Net.Commands.2.0.1\lib\net46\Discord.Net.Commands.dll</HintPath> + <Private>True</Private> </Reference> - <Reference Include="Discord.Net.Core, Version=2.0.0.0, Culture=neutral, processorArchitecture=MSIL"> - <HintPath>..\packages\Discord.Net.Core.2.0.0-beta\lib\net45\Discord.Net.Core.dll</HintPath> + <Reference Include="Discord.Net.Core, Version=2.0.1.0, Culture=neutral, PublicKeyToken=null"> + <HintPath>..\packages\Discord.Net.Core.2.0.1\lib\net46\Discord.Net.Core.dll</HintPath> + <Private>True</Private> </Reference> - <Reference Include="Discord.Net.Rest, Version=2.0.0.0, Culture=neutral, processorArchitecture=MSIL"> - <HintPath>..\packages\Discord.Net.Rest.2.0.0-beta\lib\net45\Discord.Net.Rest.dll</HintPath> + <Reference Include="Discord.Net.Rest, Version=2.0.1.0, Culture=neutral, PublicKeyToken=null"> + <HintPath>..\packages\Discord.Net.Rest.2.0.1\lib\net46\Discord.Net.Rest.dll</HintPath> + <Private>True</Private> </Reference> <Reference Include="Discord.Net.Rpc, Version=1.0.2.0, Culture=neutral, processorArchitecture=MSIL"> <HintPath>..\packages\Discord.Net.Rpc.1.0.2\lib\net45\Discord.Net.Rpc.dll</HintPath> </Reference> - <Reference Include="Discord.Net.Webhook, Version=2.0.0.0, Culture=neutral, processorArchitecture=MSIL"> - <HintPath>..\packages\Discord.Net.Webhook.2.0.0-beta\lib\netstandard1.1\Discord.Net.Webhook.dll</HintPath> + <Reference Include="Discord.Net.Webhook, Version=2.0.1.0, Culture=neutral, PublicKeyToken=null"> + <HintPath>..\packages\Discord.Net.Webhook.2.0.1\lib\netstandard1.3\Discord.Net.Webhook.dll</HintPath> + <Private>True</Private> </Reference> - <Reference Include="Discord.Net.WebSocket, Version=2.0.0.0, Culture=neutral, processorArchitecture=MSIL"> - <HintPath>..\packages\Discord.Net.WebSocket.2.0.0-beta\lib\net45\Discord.Net.WebSocket.dll</HintPath> + <Reference Include="Discord.Net.WebSocket, Version=2.0.1.0, Culture=neutral, PublicKeyToken=null"> + <HintPath>..\packages\Discord.Net.WebSocket.2.0.1\lib\net46\Discord.Net.WebSocket.dll</HintPath> + <Private>True</Private> </Reference> <Reference Include="FSharp.Core, Version=4.5.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"> <HintPath>..\packages\FSharp.Core.4.5.2\lib\net45\FSharp.Core.dll</HintPath> diff --git a/DiscoBot/Program.cs b/DiscoBot/Program.cs index 5dc69c1..9675b48 100644 --- a/DiscoBot/Program.cs +++ b/DiscoBot/Program.cs @@ -53,7 +53,7 @@ namespace DiscoBot this.client.MessageReceived += this.HandleCommandAsync; // Discover all of the commands in this assembly and load them. - return this.commands.AddModulesAsync(Assembly.GetEntryAssembly()); + return this.commands.AddModulesAsync(Assembly.GetEntryAssembly(), services); } public async Task HandleCommandAsync(SocketMessage messageParam) diff --git a/DiscoBot/packages.config b/DiscoBot/packages.config index 4aa29aa..b1d02d9 100644 --- a/DiscoBot/packages.config +++ b/DiscoBot/packages.config @@ -1,12 +1,12 @@ <?xml version="1.0" encoding="utf-8"?> <packages> - <package id="Discord.Net" version="2.0.0-beta" targetFramework="net461" /> - <package id="Discord.Net.Commands" version="2.0.0-beta" targetFramework="net461" /> - <package id="Discord.Net.Core" version="2.0.0-beta" targetFramework="net461" /> - <package id="Discord.Net.Rest" version="2.0.0-beta" targetFramework="net461" /> + <package id="Discord.Net" version="2.0.1" targetFramework="net461" /> + <package id="Discord.Net.Commands" version="2.0.1" targetFramework="net461" /> + <package id="Discord.Net.Core" version="2.0.1" targetFramework="net461" /> + <package id="Discord.Net.Rest" version="2.0.1" targetFramework="net461" /> <package id="Discord.Net.Rpc" version="1.0.2" targetFramework="net461" /> - <package id="Discord.Net.Webhook" version="2.0.0-beta" targetFramework="net461" /> - <package id="Discord.Net.WebSocket" version="2.0.0-beta" targetFramework="net461" /> + <package id="Discord.Net.Webhook" version="2.0.1" targetFramework="net461" /> + <package id="Discord.Net.WebSocket" version="2.0.1" targetFramework="net461" /> <package id="FSharp.Core" version="4.5.2" targetFramework="net461" /> <package id="Microsoft.Extensions.DependencyInjection" version="2.2.0-preview2-35157" targetFramework="net461" /> <package id="Microsoft.Extensions.DependencyInjection.Abstractions" version="2.2.0-preview2-35157" targetFramework="net461" /> |