v1

latestOpenAPI 3.0.12026-07-17310206.9 KB

Fetches all roles in a Discord guild.

This function retrieves a list of all roles within a specific Discord guild. It takes a guild ID as input and returns a Promise that resolves to an array of role objects. This can be useful for managing permissions, displaying role information, or performing role-based operations within a Discord bot or application.

post/fetchRoles

Request body

Response

Successful response

idstring

The ID of the role

namestring

The name of the role

colorinteger

The color of the role

hoistboolean

Whether the role is hoisted

positioninteger

The position of the role

permissionsstring

The permissions of the role as a string

managedboolean

Whether the role is managed by an integration

mentionableboolean

Whether the role is mentionable