Skip to content

Commit

Permalink
Add conditional serializer replacement to TestBot
Browse files Browse the repository at this point in the history
  • Loading branch information
Quahu committed Jul 30, 2024
1 parent 82389a4 commit 5d291be
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/Disqord.TestBot/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@
using Serilog;
using Serilog.Events;
using Serilog.Sinks.SystemConsole.Themes;
#if NET8_0_OR_GREATER
using Microsoft.Extensions.DependencyInjection.Extensions;
using Disqord.Serialization.Json.System;
#endif

namespace Disqord.TestBot
{
Expand All @@ -30,8 +34,9 @@ private static void Main(string[] args)
})
.ConfigureServices(services =>
{
#if NET8_0_OR_GREATER
services.Replace(ServiceDescriptor.Singleton<IJsonSerializer, SystemJsonSerializer>());
#endif
services.Configure<DefaultGatewayConfiguration>(x => x.LogsPayloads = true);
})
.UseDefaultServiceProvider(provider =>
Expand Down

0 comments on commit 5d291be

Please sign in to comment.