diff --git a/PluralKit.Bot/BotConfig.cs b/PluralKit.Bot/BotConfig.cs index a9db7233..0be554a1 100644 --- a/PluralKit.Bot/BotConfig.cs +++ b/PluralKit.Bot/BotConfig.cs @@ -25,6 +25,7 @@ public class BotConfig public bool HttpUseInnerCache { get; set; } = false; public string? HttpListenerAddr { get; set; } + public bool DisableGateway { get; set; } = false; public string? DiscordBaseUrl { get; set; } public string? AvatarServiceUrl { get; set; } diff --git a/PluralKit.Bot/Init.cs b/PluralKit.Bot/Init.cs index f19576de..c3046aa9 100644 --- a/PluralKit.Bot/Init.cs +++ b/PluralKit.Bot/Init.cs @@ -84,9 +84,11 @@ public class Init services.Resolve().Start(config.HttpListenerAddr); // Start the Discord shards themselves (handlers already set up) - logger.Information("Connecting to Discord"); - await StartCluster(services); - + if (!config.DisableGateway) + { + logger.Information("Connecting to Discord"); + await StartCluster(services); + } logger.Information("Connected! All is good (probably)."); // Lastly, we just... wait. Everything else is handled in the DiscordClient event loop