admin管理员组

文章数量:1289866

#include "CDiscord.h"

using namespace std;

static int64_t eptime = std::chrono::duration_cast<std::chrono::seconds>(std::chrono::system_clock::now().time_since_epoch()).count();

void Start()  
{
    DiscordEventHandlers Handle;
    memset(&Handle, 0, sizeof(Handle));
    Discord_Initialize("1334300888808702279", &Handle, 1, NULL);
    DiscordRichPresence discordPresence;
    memset(&discordPresence, 0, sizeof(discordPresence));
    discordPresence.details = "Game Link: scorpion.ppp";
    discordPresence.state = "Classic Server";
    discordPresence.startTimestamp = eptime;
    discordPresence.largeImageKey = "1334300888808702279";// large img
    discordPresence.largeImageText = "SCORPIONS"; // txt large img
    //discordPresence.smallImageKey = "8080"; // small img
    //discordPresence.smallImageText = "scorpion"; // txt small img
    Discord_UpdatePresence(&discordPresence);
}

void CDiscord::Shutdown()
{
    Discord_Shutdown();

}

void CDiscord::Init()
{
    CreateThread(NULL, NULL, (LPTHREAD_START_ROUTINE)Start, NULL, NULL, NULL);
}

I'm asking for buttons like these:

Example from a picture

I have an example through the following image, my friends. How can I add a Discord follow button and a button to enter the game’s web page through this proposed code ?

本文标签: c17How to create buttons on discord RPC using CStack Overflow