Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is the setRichPresence function not working? #145

Open
MCDFsteve opened this issue May 9, 2024 · 1 comment
Open

Is the setRichPresence function not working? #145

MCDFsteve opened this issue May 9, 2024 · 1 comment

Comments

@MCDFsteve
Copy link

It seems like the setRichPresence function is not updating the Rich Presence information on your Steam profile even though there are no errors and the log messages indicate success. The information displayed on Steam only shows the game you are playing without the additional Rich Presence details.

const steamworks = require('steamworks.js');
const client = steamworks.init(2520710);
const steamId = client.localplayer.getSteamId();
console.log(client.localplayer.getName());
console.log(steamId);
if (client.achievement.activate('ACHIEVEMENT')) {
    console.log('Achievement activated successfully.');
}
function logger(message) {
    console.log(message);
}
function setRichPresence(key, value) {
    console.log(`Trying to set Rich Presence with key: ${key}, value: ${value}`);
    if (client && client.localplayer) {
        client.localplayer.setRichPresence(key, value);
        console.log('Rich Presence set successfully.');
        console.log(client.localplayer.setRichPresence(key, value));
    } else {
        logger(`Could not set the rich presence, steamworks was not properly loaded!`);
    }
}
setRichPresence("status","Playing");
@MCDFsteve
Copy link
Author

Ok, the issue has been resolved. I need to set it as steam_display and upload localized text to Steamworks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant