From 4f33ed84ac07a3d70b57aa69f0bd5f2b349ad529 Mon Sep 17 00:00:00 2001 From: Ske Date: Sat, 20 Jul 2019 23:10:26 +0200 Subject: [PATCH] Disable message caching This will potentially fix the memory leaking issues. --- PluralKit.Bot/Bot.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/PluralKit.Bot/Bot.cs b/PluralKit.Bot/Bot.cs index 85385b18..ff87e9f9 100644 --- a/PluralKit.Bot/Bot.cs +++ b/PluralKit.Bot/Bot.cs @@ -81,7 +81,10 @@ namespace PluralKit.Bot .AddTransient(svc => new DbConnectionFactory(svc.GetRequiredService().Database)) - .AddSingleton() + .AddSingleton(_ => new DiscordShardedClient(new DiscordSocketConfig + { + MessageCacheSize = 0 + })) .AddSingleton() .AddTransient(_ => new CommandService(new CommandServiceConfig