feat(bot): add config setting to disable connecting to discord gateway

This commit is contained in:
alyssa 2025-03-22 15:38:21 +00:00
parent cc7122e389
commit 7cd3939f95
2 changed files with 6 additions and 3 deletions

View file

@ -84,9 +84,11 @@ public class Init
services.Resolve<HttpListenerService>().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