Servers & roleplay Guide

FiveM Discord Rich Presence: setup, assets and diagnostics

Set up FiveM Discord Rich Presence with a minimal client example. Match the application and asset key, check activity visibility and diagnose conflicting updates.

Original Magnate concept artwork; not a GTA VI screenshot Original concept artwork · Not game footage

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.

fxmanifest.lua — client-only staging resource
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.

client.lua — original illustrative example, not run in FiveM
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.

Proposed Rich Presence diagnostic sequence
ObservationNext useful check
No activity visibleDesktop app, the player’s sharing choice and whether the client resource starts
Default game activity onlyThe intended application ID and first relevant client error
Custom text but missing imageAsset key and the application under which it was registered
Status switches between valuesOther resources writing Rich Presence state
Incorrect population numberThe actual source and meaning of the displayed count
Role or whitelist still failsThe separate identity and community verification path

Treat buttons as a separate compatibility test

The pinned CitizenFX implementation includes a Rich Presence action handler and passes button data to its Discord integration. That proves an API path exists in source; it does not prove a particular current Discord client will display a working join button.

The minimal example deliberately tests application, text and artwork first. If you add buttons, test their visibility from the intended viewing account and follow the actual destination before describing them as functional. Keep a working direct community link available through the community’s normal channels.

Do not copy claims that every client displays two buttons without testing the supported environment. Source availability, a script calling an API and a user seeing the expected interface are different pieces of evidence.

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.

  1. CitizenFX — SetDiscordAppId declaration Pinned client API and application-ID argument.
  2. CitizenFX — SetDiscordRichPresenceAsset declaration Asset must belong to the selected Discord application.
  3. CitizenFX — SetRichPresence declaration Client API sets a detail string; not an automatic population calculation.
  4. CitizenFX — pinned Discord presence implementation Native handlers and Discord integration path; no current-client button display tested.
  5. 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.

Find your next move

Search the Magnate guide library.

Browse every guide