# Get Role

> Get a role in the specified server.

- ID: `get_discord_role`
- Type: Block
- Category: [Roles](https://inventor.bot/docs/reference/blocks/roles.md)

**Inputs**

| Name | Required | Description | Value |
| --- | --- | --- | --- |
| `server_id` | yes | ID of the server containing the role. |  |
| `role_id` | yes | ID of the role to retrieve (use @everyone for the default role). |  |

**Outputs**

| Name | Description | Value |
| --- | --- | --- |
| `role_id` | ID of the role. |  |
| `role_name` | Name of the role. |  |
| `role_color` | Hex color of the role. | e.g. `"#000000"` |
| `role_hoist` | Whether the role is hoisted. |  |
| `role_position` | Position of the role. | e.g. `"1"` |
| `role_permissions` | Permission bitset for the role. | e.g. `"104188992"` |
| `role_managed` | Whether the role is managed. |  |
| `role_mentionable` | Whether the role is mentionable. |  |
| `role_mention` | Mention string for the role. |  |
| `role_icon` | URL of the role's icon image, if set. |  |
| `role_unicode_emoji` | Unicode emoji assigned to the role, if set. |  |

**Example**

```go
role := get_discord_role(Args{server_id: trigger.server_id, role_id: "..."})
send_text_message(Args{channel_id: trigger.channel_id, message_content: "Role ID: " + role.role_id})
```