Conversation
PunkPun
left a comment
There was a problem hiding this comment.
When I launch a dedicated server discord detects it. While on bleed it doesn't
b8e74df to
8c83b15
Compare
You are correct. There's two instances going on here. One created by the mod manifest and the static one created if you use the static helper methods. A bit ugly. Streamlined to use one instance, and ensure that instance is able to deal with a null client. |
|
There was a reason to allow for disabling the service. #19343 Many players on slower system would benefit from it being disabled. |
|
The disabling logic |
8c83b15 to
0c61b54
Compare
Handle the client being null. Previously, a service could be created with a null client. This would leads to NREs when invoking the static Update methods. Now we guard against a null client.
0c61b54 to
a4bf635
Compare
Handle the client being null. Previously, a service could be created with a null client. This would leads to NREs when invoking the static Update methods. Now we provide a static helper to get the instance created for the mod. This avoids two instances of the DiscordService being created (a static one, and an instance created in the mod manifest).
Fixes #21275