Initialize the Discord rich presence with an empty presence

This commit is contained in:
abcdefg30
2021-10-07 18:06:50 +02:00
committed by Pavel Penev
parent 62c083bb01
commit a930c123ed

View File

@@ -79,6 +79,9 @@ namespace OpenRA.Mods.Common
client.SetSubscription(EventType.Join | EventType.JoinRequest); client.SetSubscription(EventType.Join | EventType.JoinRequest);
client.Initialize(); client.Initialize();
// Set an initial value for the rich presence to avoid a NRE in the library
client.SetPresence(new RichPresence());
} }
void OnJoinRequested(object sender, JoinRequestMessage args) void OnJoinRequested(object sender, JoinRequestMessage args)