Adding Roles to Users

A common bot task is to add roles to users either automatically on join, or via command. Here we will review some common errors that can occur.


Error: From bot logs: The supplied role is neither a role nor a snowflake

Cause: When adding a role some users will attempt to add the role name directly into the "Add Member Role" field. DBM requires a role object in order to apply the role to a user.

Solution: Instead of typing directly into the Source Role field, first you should use the Find Role action, store the role as a variable, and then use that variable in the Source Role field.


Error: From bot logs: Error with Event "Add Member Role", Action ##: DiscordAPIError: Missing Permissions

Cause: The bot has insufficient permissions to add roles to users.

Solution 1: Make sure that your bot has the permission to Manage Roles.

Solution 2: Discord does not allow a user to manage a role that is higher in the list than the users highest role. This applies to bots as well as normal users (with the exception of server owners). In your server's Role list move the bot's role higher than the roles you are trying to apply.

results matching ""

    No results matching ""