Regarding the discord RPC, you could try something like this:
CInstanceBase* pkMainInstance = CPythonCharacterManager::Instance().GetMainInstancePtr();
char info[32 + 1];
snprintf(info, sizeof(info), "Level: %u", pkMainInstance->GetLevel());
You can get other player's informations such as player name, empire id, duel state, alignment, race, etc using the same object 'pkMainInstance', you can get a list of these functions from InstanceBase.h.