Skip to main content

Discord

Connection

Setup

Klef manages your Discord server through a bot you add to it.
1
In the Discord Developer Portal, choose New Application. Under Bot, turn on Server Members Intent, then choose Reset Token and copy the token.
2
Under OAuth2, then URL Generator, choose the bot scope and the Manage Roles, Kick Members, and Manage Nicknames permissions. Open the URL it makes and add the bot to your server.
3
In your server’s Settings, under Roles, drag the bot’s role above every role Klef should assign.
4
In Discord, turn on Developer Mode under Settings, then Advanced. Right-click your server, choose Copy Server ID, and copy it into Klef with the bot token.
A bot cannot add anyone to a server, so each person joins with an invite before Klef manages them. Klef matches them by their Discord username, so keep each worker’s username in an HR custom field, such as discord_username. Klef keeps each member’s nickname and roles. It offers only the roles below the bot’s own that no integration manages. Switching a member off kicks them from the server.

Settings

discord.member

Fields

Default Account Matching Rules

When Klef adopts an account that already exists in Discord, it works out whose it is by trying these in order. A connection can override them.

Examples

Discord members

Keeps each engineer’s Discord nickname set, and kicks them from the server when they leave.