Initialize the Discord rich presence with an empty presence
This commit is contained in:
@@ -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)
|
||||||
|
|||||||
Reference in New Issue
Block a user