Build chat bots with blocks

roles user (user) has in server (guild)

In Discord → Roles

Jump to block

Get the roles a user has in a server.

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


Parameter name Parameter type Required? Description
user user The user to get roles for.
guild guild The server to get roles for the user in.


Array - The roles the user has in the specified server.