Keep activity display separate from account verification
Rich Presence is the activity information a player may show in Discord. A community can use it to identify the game or server experience, but a visible status is not a role or whitelist approval. Use the linking guide when the actual problem is identity or access.
This guide reviews CitizenFX API declarations and implementation at commit 5c3065c261fb3ba82032fee6803f247198fec221. The code below is an original minimal staging example, not a gameplay-tested resource or a guarantee that every Discord client displays the same fields.
Match the application ID and artwork key
SetDiscordAppId is documented as a client API taking a Discord application ID string. SetDiscordRichPresenceAsset takes an asset name registered under that same application. A local file name, a Cfx server icon and a Discord application asset are different references.
Use the application you manage in Discord’s developer tools and record the asset key exactly as registered. The example uses server_logo as a placeholder asset key. Replace it with your own key rather than assuming a logo uploaded to Cfx Portal is available to Discord.
The public application ID is not a bot token or client secret. This simple client example does not need either credential. Keep server-only credentials out of files delivered to players.
Create a minimal client resource
For a staging resource named presence-demo, create fxmanifest.lua and client.lua together. The manifest below loads the client file. Keep this example separate from other resources that already own your community’s presence updates.
fx_version 'cerulean'
game 'gta5'
client_script 'client.lua' Set one static presence before adding dynamic values
Replace the application-ID placeholder and artwork key before starting the staging resource. The placeholder guard deliberately stops the example until a numeric ID string is supplied. The text is a static demonstration, not a live population count.
local appId = 'REPLACE_WITH_YOUR_APPLICATION_ID'
local assetKey = 'server_logo'
if not appId:match('^%d+$') then
print('[presence-demo] Configure your Discord application ID first.')
return
end
SetDiscordAppId(appId)
SetDiscordRichPresenceAsset(assetKey)
SetRichPresence('Staging - example server') Check visibility from the intended viewing context
Discord’s own activity guidance describes using the desktop app to display PC game activity and controlling sharing through Activity Privacy. The result a friend sees also needs to be checked in the intended account and viewing context. Do not treat a disabled sharing preference as a broken server resource.
On staging, record whether any game activity appears, whether the custom text appears and whether the chosen image appears. Those are separate observations. If the player prefers not to share activity, preserve that choice rather than making public status a prerequisite for unrelated gameplay.
Magnate has not created a Discord application, uploaded an asset, changed a player’s sharing preference or verified a live status with another account. Follow Discord’s current interface when the labels differ from an older tutorial.
Diagnose text, artwork and competing updates separately
SetRichPresence supplies a detail string; it does not calculate a server player count for you. Establish one static result before adding any dynamic population or session data. Define where a number comes from and what it counts before putting it into a public status.
If the text or artwork repeatedly changes, investigate which resources call the presence APIs. Two independent owners can overwrite the same state. Review the relevant source and startup configuration on staging before disabling a package that also provides other gameplay behavior.
| Observation | Next useful check |
|---|---|
| No activity visible | Desktop app, the player’s sharing choice and whether the client resource starts |
| Default game activity only | The intended application ID and first relevant client error |
| Custom text but missing image | Asset key and the application under which it was registered |
| Status switches between values | Other resources writing Rich Presence state |
| Incorrect population number | The actual source and meaning of the displayed count |
| Role or whitelist still fails | The separate identity and community verification path |
Record a reproducible result before rollout
For a proposed acceptance run, note the FiveM edition/build, Discord version, resource revision, application ID reference, asset key and the viewing context. Use a test account where appropriate and compare the same scene after one change at a time.
Keep errors and observed results, not account tokens, in the report. Confirm your actual application and artwork under your own account before publishing a community-wide change. This article performs no live configuration or authorization action.
Use the manifest guide if the client file never loads and the Discord linking guide if identity or role checks fail. These GTA V/FiveM APIs do not establish GTA VI support or its future social features.
Questions, answered.
Does Rich Presence prove a player is whitelisted?
No. Activity display and community identity/role checks are separate integrations.
Can I use a Cfx Portal icon filename as the Discord asset key?
Do not assume so. The documented image API expects an asset registered under the Discord application selected by the app-ID API.
Does SetRichPresence calculate the server population?
No. It sets a detail string. Your implementation must supply a correctly defined value if you choose to display a count.
Sources & editorial notes
Source review: November 7, 2026. Platform announcements can change. This guide separates published facts from Magnate’s original analysis and preparation advice.
- CitizenFX — SetDiscordAppId declaration Pinned client API and application-ID argument.
- CitizenFX — SetDiscordRichPresenceAsset declaration Asset must belong to the selected Discord application.
- CitizenFX — SetRichPresence declaration Client API sets a detail string; not an automatic population calculation.
- CitizenFX — pinned Discord presence implementation Native handlers and Discord integration path; no current-client button display tested.
- Discord — sharing game activity Official desktop activity and sharing-control guidance; reviewed November 7, 2026.
Published by an independent editorial brand. Read our editorial standards.