Port some things, still does not compile
This commit is contained in:
@@ -3,9 +3,7 @@ using System.Net.Http;
|
||||
|
||||
using Autofac;
|
||||
|
||||
using Discord;
|
||||
using Discord.Rest;
|
||||
using Discord.WebSocket;
|
||||
using DSharpPlus;
|
||||
|
||||
using PluralKit.Core;
|
||||
|
||||
@@ -18,18 +16,12 @@ namespace PluralKit.Bot
|
||||
protected override void Load(ContainerBuilder builder)
|
||||
{
|
||||
// Client
|
||||
builder.Register(c => new DiscordShardedClient(new DiscordSocketConfig()
|
||||
{
|
||||
MessageCacheSize = 0,
|
||||
ConnectionTimeout = 2 * 60 * 1000,
|
||||
ExclusiveBulkDelete = true,
|
||||
LargeThreshold = 50,
|
||||
GuildSubscriptions = false,
|
||||
DefaultRetryMode = RetryMode.RetryTimeouts | RetryMode.RetryRatelimit
|
||||
// Commented this out since Debug actually sends, uh, quite a lot that's not necessary in production
|
||||
// but leaving it here in case I (or someone else) get[s] confused about why logging isn't working again :p
|
||||
// LogLevel = LogSeverity.Debug // We filter log levels in Serilog, so just pass everything through (Debug is lower than Verbose)
|
||||
})).AsSelf().As<BaseDiscordClient>().As<BaseSocketClient>().As<IDiscordClient>().SingleInstance();
|
||||
builder.Register(c => new DiscordShardedClient(new DiscordConfiguration
|
||||
{
|
||||
Token = c.Resolve<BotConfig>().Token,
|
||||
TokenType = TokenType.Bot,
|
||||
MessageCacheSize = 0,
|
||||
})).AsSelf().SingleInstance();
|
||||
|
||||
// Commands
|
||||
builder.RegisterType<CommandTree>().AsSelf();
|
||||
|
||||
Reference in New Issue
Block a user