mirror of
https://github.com/ClassiCube/MCGalaxy.git
synced 2025-09-24 05:03:34 -04:00
Allow adding extra intents to discord relay bot
This commit is contained in:
parent
6b3af740b7
commit
7bd2ad38ea
@ -403,9 +403,11 @@ namespace MCGalaxy.Modules.Relay.Discord
|
||||
|
||||
|
||||
protected override void OnStart() {
|
||||
session = new DiscordSession();
|
||||
base.OnStart();
|
||||
DiscordSession s = new DiscordSession();
|
||||
s.Intents = DiscordWebsocket.DEFAULT_INTENTS | Config.ExtraIntents;
|
||||
session = s;
|
||||
|
||||
base.OnStart();
|
||||
OnPlayerConnectEvent.Register(HandlePlayerConnect, Priority.Low);
|
||||
OnPlayerDisconnectEvent.Register(HandlePlayerDisconnect, Priority.Low);
|
||||
OnPlayerActionEvent.Register(HandlePlayerAction, Priority.Low);
|
||||
|
@ -59,6 +59,9 @@ namespace MCGalaxy.Modules.Relay.Discord
|
||||
[ConfigBool("embed-show-game-statuses", "Embeds", true)]
|
||||
public bool EmbedGameStatuses = true;
|
||||
|
||||
[ConfigInt("extra-intents", "Intents", 0)]
|
||||
public int ExtraIntents;
|
||||
|
||||
public const string PROPS_PATH = "properties/discordbot.properties";
|
||||
static ConfigElement[] cfg;
|
||||
|
||||
|
@ -31,7 +31,7 @@ namespace MCGalaxy.Modules.Relay.Discord
|
||||
public sealed class DiscordSession
|
||||
{
|
||||
public string ID, LastSeq;
|
||||
public int Intents = DiscordWebsocket.DEFAULT_INTENTS;
|
||||
public int Intents;
|
||||
}
|
||||
public delegate string DiscordGetStatus();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user