1. Add the resource
Place the wd_richpresence folder in your server's resources directory. Do not rename it; exports and events use the folder name.
2. Turn off other Rich Presence scripts
A player can only show one Discord Rich Presence. If another resource also sets it, the two overwrite each other: the profile keeps switching between them, and the character photo may never appear. Turn off every other presence before continuing.
Qbox
Qbox has its own Discord presence, and it is on by default.
- Open
qbx_core/config/client.lua. - Find the
discord = {section. - Change
enabled = truetoenabled = false:
discord = {
enabled = false, -- This will enable or disable the built in discord rich presence.- Save the file.
QBCore
qb-smallresources includes a Discord presence. It is off by default, but check it in case it was turned on.
- Open
qb-smallresources/config.lua. - Find the
Config.Discord = {section. - Make sure it says
isEnabled = false:
Config.Discord = {
isEnabled = false, -- If set to true, then discord rich presence will be enabled- Save the file.
ESX
ESX Legacy includes a Discord presence. It is off while its Application ID is 0, which is the default.
- Open
es_extended/shared/config/adjustments.lua. - Find the
Config.DiscordActivity = {section. - Make sure it says
appId = 0:
Config.DiscordActivity = {
appId = 0, -- Discord Application ID,- Save the file.
Find any other presence scripts
Other resources can set a presence too. To find them, search your resources folder for SetDiscordAppId, which every presence script uses.
On Windows, open Command Prompt in your resources folder and run:
findstr /s /i /m "SetDiscordAppId" *.luaOn Linux, run this in your resources folder:
grep -ril "SetDiscordAppId" --include=*.lua .Every file listed, other than those in wd_richpresence and the ones turned off above, belongs to another presence script. Turn off its presence option, or remove the resource from server.cfg if presence is all it does. Escrowed resources cannot be searched this way, so also check the configs of paid scripts for a Discord or Rich Presence option.
These changes take effect after a server restart, which you will do in the last step.
3. Create the database table
The resource creates its table automatically the first time it starts, so you can skip this step. If you prefer to create it yourself, import the included wd_richpresence.sql into the database used by oxmysql:
CREATE TABLE IF NOT EXISTS `wd_richpresence_mugshots` (
`identifier` VARCHAR(100) NOT NULL,
`url` VARCHAR(1024) NOT NULL,
`appearance_hash` VARCHAR(64) NOT NULL,
`host` VARCHAR(16) NOT NULL DEFAULT 'fivemanage',
`remote_id` VARCHAR(64) DEFAULT NULL,
`updated_at` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`identifier`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;To turn off automatic table creation, set ServerConfig.AutoCreateTable = false in server_config.lua.
4. Add it to server.cfg
Start Wolfden Rich Presence after oxmysql, your framework and your clothing script:
ensure oxmysql
ensure qbx_core # or qb-core / es_extended
ensure illenium-appearance
ensure wd_richpresenceIf your framework starts later than this resource, it is not detected and the resource falls back to standalone mode.
5. Set up Discord
Follow Discord application to get your Application ID, upload your logo and add your buttons. Without an Application ID, no presence is shown.
6. Connect an image host
Follow Image hosting to store character photos on Fivemanage, or on your own server.
7. Restart and test
- Restart your server.
- Check the server console. You should see
Framework: qbox(or your framework) and noMugshots disabledwarning. - Join with the Discord desktop app running. Your profile shows your logo and the character selection messages.
- Load a character. After about five seconds, the large image changes to your character's face.
- Stay in the city for two minutes. The presence should keep showing your application name and messages. If it switches to another name or image, another presence is still on; go back to step 2.
Your own Join Server and Discord buttons are hidden from you by Discord. Ask a friend, or use a second account, to check them.
If something does not appear, set Config.Debug = true and see Troubleshooting.