mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-04 04:56:49 +00:00
feat(bot): add config setting to disable connecting to discord gateway
This commit is contained in:
parent
cc7122e389
commit
7cd3939f95
2 changed files with 6 additions and 3 deletions
|
|
@ -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; }
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue