<commit_before>using System;
using System.Runtime.InteropServices;
using System.Threading;
using Discord;
using Discord.Addons.Interactive;
using Discord.Commands;
using Discord.Interactions;
using Discord.WebSocket;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
using Serilog;
using YuGiOh.Bot.Models;
using YuGiOh.Bot.Services;
using YuGiOh.Bot.Services.Interfaces;
using YuGiOh.Common.Interfaces;
using YuGiOh.Common.Repositories;
using YuGiOh.Common.Repositories.Interfaces;
using RunMode = Discord.Commands.RunMode;

namespace YuGiOh.Bot.Extensions;

public static class ServiceCollectionExtensions
{

    #region Discord Client Configs

    private static readonly DiscordSocketConfig ClientConfig = new()
    {

        ConnectionTimeout = (int) TimeSpan.FromMinutes(1).TotalMilliseconds, //had to include this as my bot got bigger and there were more guilds to connect to per shard
        LogLevel = LogSeverity.Verbose,
        MessageCacheSize = 20,
        TotalShards = 1

    };

    private static readonly CommandServiceConfig CommandConfig = new()
    {

        DefaultRunMode = RunMode.Async,
        LogLevel = LogSeverity.Verbose

    };

    private static readonly InteractionServiceConfig InteractionConfig = new()
    {

        DefaultRunMode = Discord.Interactions.RunMode.Async,
        LogLevel = LogSeverity.Verbose,
        UseCompiledLambda = true //let's try it out, it can't use that much more memory..... hopefully<commit_msg>Added SuppressUnknownDispatchWarnings = true to config after Discord.NET 3.4.1 introduced config option<commit_after>using System;
using System.Runtime.InteropServices;
using System.Threading;
using Discord;
using Discord.Addons.Interactive;
using Discord.Commands;
using Discord.Interactions;
using Discord.WebSocket;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
using Serilog;
using YuGiOh.Bot.Models;
using YuGiOh.Bot.Services;
using YuGiOh.Bot.Services.Interfaces;
using YuGiOh.Common.Interfaces;
using YuGiOh.Common.Repositories;
using YuGiOh.Common.Repositories.Interfaces;
using RunMode = Discord.Commands.RunMode;

namespace YuGiOh.Bot.Extensions;

public static class ServiceCollectionExtensions
{

    #region Discord Client Configs

    private static readonly DiscordSocketConfig ClientConfig = new()
    {

        ConnectionTimeout = (int) TimeSpan.FromMinutes(1).TotalMilliseconds, //had to include this as my bot got bigger and there were more guilds to connect to per shard
        LogLevel = LogSeverity.Verbose,
        SuppressUnknownDispatchWarnings = true,
        MessageCacheSize = 20,
        TotalShards = 1

    };

    private static readonly CommandServiceConfig CommandConfig = new()
    {

        DefaultRunMode = RunMode.Async,
        LogLevel = LogSeverity.Verbose

    };

    private static readonly InteractionServiceConfig InteractionConfig = new()
    {

        DefaultRunMode = Discord.Interactions.RunMode.Async,
        LogLevel = LogSeverity.Verbose,
        UseCompiledLambda = true //let's try it out, it can't use that much more memory..... hopefully
{'fraction_non_alphanumeric': 0.07270408163265306, 'fraction_numerical': 0.00350765306122449, 'mean_word_length': 4.0111821086261985, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1557727', 'n_tokens_mistral': 906, 'n_tokens_neox': 864, 'n_words': 241}