# CFX::SET_DISCORD_RICH_PRESENCE_ACTION

- **Hash:** `0xCBBC3FAC`
- **Namespace:** CFX
- **Runtime name (Lua/JS):** `SetDiscordRichPresenceAction`
- **Side:** client (Cfx runtime native)
- **Name status:** official
- **Documentation:** described
- **URL:** https://natives.borderlinerp.com/natives/CFX/SET_DISCORD_RICH_PRESENCE_ACTION

## Signature

```c
void SET_DISCORD_RICH_PRESENCE_ACTION(int index, char* label, char* url);
```

## Parameters

- `index` (`int`) — The button index, either 0 or 1.
- `label` (`char*`) — The text to display on the button.
- `url` (`char*`) — The URL to open when clicking the button. This has to start with `fivem://connect/` or `https://`.

## Returns

`void`

## Description

*Source: Cfx.re native reference*

Sets a clickable button to be displayed in a player's Discord rich presence.

## Usage

### Lua

```lua
SetDiscordRichPresenceAction(index, label, url)

-- always available, by hash
Citizen.InvokeNative(0xcbbc3fac, index, label, url)
```

### JavaScript

```js
SetDiscordRichPresenceAction(index, label, url);

// by hash
Citizen.invokeNative('0xcbbc3fac', index, label, url);
```

### C#

```csharp
Function.Call((Hash)0xcbbc3fac, index, label, url);
```

*Sources: Cfx.re native reference.*
