Answer the question
In order to leave comments, you need to log in
How to use Discord Join API and Spectate API in Node.js?
Javascript Node.js Help me understand using the library and API.
Is it possible to file features from screenshots (features that are originally from the Discord Api Game Sdk) into the game on Electron using the modules below. I could, but I don’t understand where to get the Secret of the team, the match, etc. In order for the Ask to join button to appear (or just Join in some cases), you need to specify partyMax, partySize, partyId, joinSecret in RichPresence. Where to get partyId and joinSecret??? To observe, specify spectateSecret. And where to get it???? I also read some articles and realized that the game needs to establish some kind of connection with the DS and then it would seem that it would be possible to get these values ...?
Help me figure it out please!
RichPresence code example in C++, C, Unreal, Unity:
static void UpdatePresence()
{
char buffer[256];
DiscordRichPresence discordPresence;
memset(&discordPresence, 0, sizeof(discordPresence));
discordPresence.state = "In a Group";
sprintf(buffer, "Ranked | Mode: %d", GameEngine.GetMode());
discordPresence.details = buffer;
discordPresence.endTimestamp = time(0) + 5 * 60;
discordPresence.largeImageKey = "canary-large";
discordPresence.smallImageKey = "ptb-small";
discordPresence.partyId = GameEngine.GetPartyId();
discordPresence.partySize = 1;
discordPresence.partyMax = 6;
discordPresence.matchSecret = "4b2fdce12f639de8bfa7e3591b71a0d679d7c93f";
discordPresence.spectateSecret = "e7eb30d2ee025ed05c71ea495f770b76454ee4e0";
discordPresence.instance = 1;
Discord_UpdatePresence(&discordPresence);
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question