Update Role

BlockRoles

Update a role in the specified server.

Inputs

Server IDRequired

ID of the server containing the role.

Role IDRequired

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.

Optionstruefalse
Role Permissions

Permissions for the role.

OptionsAdd ReactionsAdministratorAttach FilesBan MembersBypass SlowmodeChange NicknameConnectCreate EventsCreate ExpressionsCreate Instant InviteCreate Private ThreadsCreate Public ThreadsDeafen MembersEmbed LinksKick MembersManage ChannelsManage EventsManage ExpressionsManage MessagesManage NicknamesManage RolesManage ServerManage ThreadsManage WebhooksMention EveryoneMove MembersMute MembersPin MessagesPriority SpeakerRead Message HistoryRequest to SpeakSend MessagesSend Messages in ThreadsSend PollsSend TTS MessagesSend Voice MessagesSet Voice Channel StatusSpeakStreamTimeout MembersUse Application CommandsUse Embedded ActivitiesUse External AppsUse External EmojisUse External SoundsUse External StickersUse SoundboardUse VADView Audit LogView ChannelView Creator Monetization AnalyticsView Guild Insights
Role Mentionable

Whether the role is mentionable.

Optionstruefalse

Outputs

Role ID

ID of the role.

Role Name

Name of the role.

Role Color

Hex color of the role.

Example: #000000

Role Hoist

Whether the role is hoisted.

Role Position

Position of the role.

Example: 1

Role Permissions

Permission bitset for the role.

Example: 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

URL of the role's icon image, if set.

Role Unicode Emoji

Unicode emoji assigned to the role, if set.

Build a bot using blocks like Update Role

Use this block in our visual flow editor. Bots are hosted 24/7 for free on inventor.bot.

Advanced Documentation

This documentation can be useful when using code mode. View as Markdown

ID: update_role

Inputs

FieldInventScript nameValue
Server IDserver_id
Role IDrole_id
Role Namerole_name
Role Colorrole_color
Role Hoistrole_hoist"true", "false"
Role Permissionsrole_permissions"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 Mentionablerole_mentionable"true", "false"

Outputs

FieldInventScript nameValue
Role IDrole_id
Role Namerole_name
Role Colorrole_colore.g. "#000000"
Role Hoistrole_hoist
Role Positionrole_positione.g. "1"
Role Permissionsrole_permissionse.g. "104188992"
Role Managedrole_managed
Role Mentionablerole_mentionable
Role Mentionrole_mention
Role Icon URLrole_icon
Role Unicode Emojirole_unicode_emoji

Example InventScript

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})

More roles blocks