> For the complete documentation index, see [llms.txt](https://docs.badger.store/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.badger.store/fivem-discord-scripts/badger_discord_api/getroleidfromrolename.md).

# GetRoleIdFromRoleName

## GetRoleIdFromRoleName

<mark style="color:blue;">`GET`</mark> `exports.Badger_Discord_API:GetRoleIdFromRoleName(roleName)`

This export allows you to get a Discord role ID from what it is named on the Guild.

#### Query Parameters

| Name     | Type   | Description                                       |
| -------- | ------ | ------------------------------------------------- |
| roleName | string | The name of the Discord role you want the ID for. |

{% tabs %}
{% tab title="200 Number of role ID will be returned:" %}

```
761459588058185738
```

{% endtab %}

{% tab title="404 Could not find a role with the name provided:" %}

```
nil
```

{% endtab %}
{% endtabs %}
