Piecewise

Build chat bots with blocks

find role in server (guild) with name (name)

In Discord → Roles

Jump to block

Finds the first role in a server with a particular name. (Note: you should be using IDs instead. Enable developer mode and right click the role to get its ID.)

Requires the following blocks to be present in the project: discord login

Parameters

Parameter name Parameter type Required? Description
guild guild The server to search for the role in.
name String The name of the role to find.

Output

role - The role if found, or null.