# Update Role

> Update a role in the specified server.

- ID: `update_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 update. |  |
| `role_name` |  | New name for the role. |  |
| `role_color` |  | Hex color (e.g. #5865F2) or integer color value. |  |
| `role_hoist` |  | Whether the role is hoisted. | `"true"`, `"false"` |
| `role_permissions` |  | Permissions for the role. | `"Add Reactions"`, `"Administrator"`, `"Attach Files"`, `"Ban Members"`, `"Bypass Slowmode"`, `"Change Nickname"`, `"Connect"`, `"Create Events"`, `"Create Expressions"`, `"Create Instant Invite"`, `"Create Private Threads"`, `"Create Public Threads"`, `"Deafen Members"`, `"Embed Links"`, `"Kick Members"`, `"Manage Channels"`, `"Manage Events"`, `"Manage Expressions"`, `"Manage Messages"`, `"Manage Nicknames"`, `"Manage Roles"`, `"Manage Server"`, `"Manage Threads"`, `"Manage Webhooks"`, `"Mention Everyone"`, `"Move Members"`, `"Mute Members"`, `"Pin Messages"`, `"Priority Speaker"`, `"Read Message History"`, `"Request to Speak"`, `"Send Messages"`, `"Send Messages in Threads"`, `"Send Polls"`, `"Send TTS Messages"`, `"Send Voice Messages"`, `"Set Voice Channel Status"`, `"Speak"`, `"Stream"`, `"Timeout Members"`, `"Use Application Commands"`, `"Use Embedded Activities"`, `"Use External Apps"`, `"Use External Emojis"`, `"Use External Sounds"`, `"Use External Stickers"`, `"Use Soundboard"`, `"Use VAD"`, `"View Audit Log"`, `"View Channel"`, `"View Creator Monetization Analytics"`, `"View Guild Insights"` |
| `role_mentionable` |  | Whether the role is mentionable. | `"true"`, `"false"` |

**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 := update_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})
```