enable zstd gateway compression

This commit is contained in:
13xforever
2025-03-25 16:13:07 +05:00
parent 664c0ea22b
commit dcf3873470
2 changed files with 9 additions and 2 deletions

View File

@@ -8,6 +8,7 @@ using CompatApiClient;
using CompatApiClient.Compression;
using CompatApiClient.POCOs;
using CompatApiClient.Utils;
using CompatBot.Commands.AutoCompleteProviders;
using CompatBot.Database;
using CompatBot.Database.Providers;
using CompatBot.EventHandlers;
@@ -54,7 +55,12 @@ internal static partial class CompatList
[Command("compatibility")]
[Description("Search the game compatibility list")]
public static async ValueTask Compat(SlashCommandContext ctx, [Description("Game title or product code to look up")] string title)
public static async ValueTask Compat(
SlashCommandContext ctx,
[Description("Game title or product code to look up")]
[SlashAutoCompleteProvider<ProductCodeAutoCompleteProvider>]
string title
)
{
if (await ContentFilter.FindTriggerAsync(FilterContext.Chat, title).ConfigureAwait(false) is not null)
{

View File

@@ -134,6 +134,8 @@ internal static class Program
var mediaScreenshotMonitor = new MediaScreenshotMonitor();
var clientBuilder = DiscordClientBuilder
.CreateDefault(Config.Token, DiscordIntents.All)
.ConfigureLogging(builder => builder.AddNLog(LogManager.Configuration))
.UseZstdCompression()
.UseCommands((services, extension) =>
{
var textCommandProcessor = new TextCommandProcessor(new()
@@ -175,7 +177,6 @@ internal static class Program
#endif
})
.UseInteractivity()
.ConfigureLogging(builder => builder.AddNLog(LogManager.Configuration))
.ConfigureEventHandlers(config =>
{
config.HandleSessionCreated(async (c, sceArgs) =>