Set role icon
discord_
Write
- Toolset
- Roles
roles - Discord permission
- Manage Roles
- Context cost
- 269 tokens, estimated1,074 bytes of definition, divided by 4
Set or clear a role's icon, either a custom image or a unicode emoji. Requires the server to be Boost Level 2+ (the ROLE_ICONS feature) and the Manage Roles permission. Pass null to either field to remove that icon. Returns a confirmation.
Risk and annotations
Read-onlyreadOnlyHint | no | Can modify your server. |
|---|---|---|
DestructivedestructiveHint | no | Declared non-destructive. |
IdempotentidempotentHint | yes | Repeating the call with the same arguments has no additional effect. |
Open worldopenWorldHint | yes | Interacts with an external system: Discord. |
Annotations are hints the server declares. Clients use them to decide when to ask you before a call.
Parameters
| Parameter | Type | Rules | Description |
|---|---|---|---|
| guild_ | string | pattern ^\d{17,20}$ | Discord server (guild) ID (snowflake). |
| role_ | string | pattern ^\d{17,20}$ | ID (snowflake) of the role to set the icon on. |
| iconoptional | string or "null" or null | string:format uripattern ^https?://"null" null | Image URL for the role icon, or null to remove it. |
| unicode_ | string or null | none | Unicode emoji to use as the role icon, or null to remove it. |
Output
This tool declares no output schema. Its description says what it returns; this page shows no example rather than invent one.
Related tools
Also in Roles
-
List roles, Read-only
discord_list_ roles -
Create role, Write
discord_create_ role -
Edit role, Write
discord_edit_ role -
Delete role, Destructive
discord_delete_ role -
Add role to member, Write
discord_add_ role -
Remove role from member, Write
discord_remove_ role -
Get role members, Read-only
discord_get_ role_ members -
Set role position, Write
discord_set_ role_ position
Raw definition (1,074 bytes)
{
"name": "discord_set_role_icon",
"description": "Set or clear a role's icon, either a custom image or a unicode emoji. Requires the server to be Boost Level 2+ (the ROLE_ICONS feature) and the Manage Roles permission. Pass null to either field to remove that icon. Returns a confirmation.",
"inputSchema": {
"type": "object",
"properties": {
"guild_id": {
"type": "string",
"pattern": "^\\d{17,20}$",
"description": "Discord server (guild) ID (snowflake)."
},
"role_id": {
"type": "string",
"pattern": "^\\d{17,20}$",
"description": "ID (snowflake) of the role to set the icon on."
},
"icon": {
"description": "Image URL for the role icon, or null to remove it.",
"anyOf": [
{
"anyOf": [
{
"type": "string",
"format": "uri",
"pattern": "^https?://"
},
{
"type": "string",
"const": "null"
}
]
},
{
"type": "null"
}
]
},
"unicode_emoji": {
"description": "Unicode emoji to use as the role icon, or null to remove it.",
"type": [
"string",
"null"
]
}
},
"required": [
"guild_id",
"role_id"
],
"additionalProperties": false
},
"annotations": {
"title": "Set role icon",
"readOnlyHint": false,
"destructiveHint": false,
"idempotentHint": true,
"openWorldHint": true
}
}