🎖️
Add Role
base.role.addBase SetUserHands out a Discord role to a user. Perfect for level-up rewards, verifications, unlock systems, or any time someone earns access to something. The bot needs Manage Roles permission for this to work.
When to use this
- →Get a Role ID by right-clicking a role in Server Settings → Copy ID
- →Hook up the Error port — the bot can't add roles higher than its own in the hierarchy
On the canvas
This is what Add Role looks like when you place it on your flow. Each field below is something you configure in the inspector panel.
🎖️User
Add Role
base.role.adduserIdrequired
{{user.id}}
roleIdrequired
123456789012345
output
error
Config fields
| Field | Type | Req | What it does |
|---|---|---|---|
userId{{user.id}} | text | yes | Who to give it to 👤 |
roleId123456789012345 | text | yes | Which role (ID) 🎖️ |
Output ports
outputRole added, moving on
errorCouldn't add the role — wrong ID, bot lacks permission, etc.
📐
In TypeScript, this would be…
Not something you need to write — just a look at what Kitcord does for you.
TypeScript
try {
const member = await guild.members.fetch(userId);
await member.roles.add(roleId);
} catch {
// Error port — hierarchy or invalid role
}Related pieces
More User pieces