BuildcordDocs

Change a role for many

Give a role to, or take it from, everyone who has another role, or everyone.

member.bulkRole goes through the server's members and changes a role for each one that matches.

Settings

SettingWhat it does
DoGive the role, or take it away.
RoleThe role to give or take.
From members withOnly members who have this role. Empty is everyone.
At mostHow many members to change, up to 1000.
Audit log reasonThe reason Discord records.

Ways out

out. Turn on If it fails for a red way out.

Produces

{bulk.count}: how many members were changed.

Notes

  • Bots are left out, and so are members who already have (or don't have) the role.
  • Listing a server's members needs the Server Members intent, which the builder asks for when a flow uses this node. Turn it on in the Discord developer portal.
  • The bot needs the Manage Roles permission, and the role must sit below the bot's highest.
  • Discord limits how fast roles can change, so a thousand members takes a few minutes. In a command, put a Defer reply first.

Example

When a season ends, take the Season 3 role from everyone who has it.

On this page