Open SayuShira opened 2 years ago
Hi!
I actually did'nt even know that it is possible to have several discord clients running at the same time, so I never considered it.
From what I understand you moved away from DiscordRPC to the Discord SDK.
Correct! From the Discord GameSDK I found the following here, which describes basically exactly the thing you want to do (Section "Testing Locally with Two Clients"):
// This machine opened Discord Canary first, and Discord PTB second
// This makes the SDK connect to Canary
System.Environment.SetEnvironmentVariable("DISCORD_INSTANCE_ID", "0");
var discord = new Discord(applicationId, Discord.CreateFlags.Default);
// This makes the SDK connect to PTB
System.Environment.SetEnvironmentVariable("DISCORD_INSTANCE_ID", "1");
var discord = new Discord(applicationId, Discord.CreateFlags.Default);
Problem here is that I'm not sure if the wrapper library in python supports those flags, but as it reads an environment variable, it should work? So tl;dr: it could be possible, probably you can find out if you can simply set the DISCORD_INSTANCE_ID as a system wide environment variable? You'd need to have two instances of GW2RPC running still, for now.
I don't really know much about .spec, but including the DLL into the added files got rid of the error and showed the usual info when in-game. Might be a worthwhile change?
I did the exact same thing in building, just forgot to update the build instructions! Will fix soon, ty!
Sorry for the late reply! I will try out the SDK via an environment variable later today. Thank you very much for the help already!
Ah, I see. Thank you for providing them in the first place. I would have been lost without it.
Glad if pointing that out will help someone else.
Hello~
A while ago I looked into the changes required to send the RPC data to my DiscordPBT installation, as well as my normal Discord. Currently, I'm starting two versions of GW2RPC. The normal and a modified installation where i changed this line in
rpc.py
:IIRC DiscordRPC can use pipes numbered from 0 to 9- usually, it will use 0 first, then 1, ... As I have two Discord installations, the pipe they use changes depending on which starts faster x.x
From what I understand you moved away from DiscordRPC to the Discord SDK. But as I don't have more knowledge on that or your project, I'm merely asking: Is it- with moderate work to do- possible to support multiple installations from the get-go? As in one GW2RPC open and data sent to all available Discord installations.
Or do you know off the top of your head if I can make changes so that the new SDK version uses a different Discord installation?
It still appears to use the first one I opened - or at least not only the normal Discord client.
And as a side note regarding this.
While making my changes and creating my .exe file, I got errors that the
discord_game_sdk.dll
file was not found. Copying the DLL into the /dist folder, where I executed my version, solved this. Your zip download however didn't need to include the DLL file separate from the .exe. Honestly no clue why not.Again, I don't really know much about .spec, but including the DLL into the added files got rid of the error and showed the usual info when in-game. Might be a worthwhile change?
Thanks for reading~ not really an expert in any of this, so maybe the questions seem strange, idk. >.<